You are on page 1of 1

#include <iostream>

using namespace std;

int main()
{
long long n, Argint, Aur, Rubin, i, AgC, AuC, RbC;
cin >> n;
Argint = 4;
Aur = 5;
Rubin = 7;
for (i=1; i<=n; i++)
{
AgC = Argint;
AuC = Aur;
RbC = Rubin;
Argint = AgC+AuC;
Aur = AgC + RbC;
Rubin = AgC+AuC+RbC;
}
cout << Argint << " " << Aur << " " << Rubin;
return 0;
}

You might also like