#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
long long n, a, b, fib, arr[105];
while(scanf("%lld", &n)==1)
{
if(n==-1)
{
break;
}
a=1;
b=1;
for(int i=0; i<=n; i++)
{
fib=a+b;
arr[i]=fib-1;
a=b;
b=fib;
}
printf("%lld %lld\n", arr[n-1], arr[n]);
}
return 0;
}
No comments:
Post a Comment