#include<cstdio> using namespace std; typedef unsigned long long llu; llu f[90]={0}; llu fib(int n) { if (n<4) f[n]=n; if (f[n]==0) f[n]=fib(n-2)+fib(n-1); return f[n]; } int main() { int n; while (scanf("%d",&n)&& n) printf("%llu\n",fib(n)); return 0; }
Wednesday, July 20, 2016
Unknown
Studying at Shahjalal University of Science and Technology, Sylhet.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment