标签:style blog http ar io color sp for on
题目来源:南阳OJhttp://acm.nyist.net/JudgeOnline/problem.php?pid=13
3 1 3 5
1 2 5
1 #include<stdio.h> 2 char min(char a, char b){ return (a>b)?b:a;} 3 char max(char a, char b){ return (a>b)?a:b;} 4 void swapIntOrChar(int a, int b){ a^=b^=a^=b;} 5 6 /*-------- fibonacci -----*/ 7 unsigned long long f[93];//f[92]= 12200 16041 51218 76738 (20位), 8 //unsigned long long最大18446744073709551615 //20位 9 void generateFbnc( int n){//形成n个fibonacci数列数,供用。。 10 f[0] = f[1] = 1; 11 for(int i = 2; i < n; i++) f[i] = f[i-1] + f[i-2]; 12 } 13 int main(){ 14 int loop_rounds; 15 generateFbnc(93);//生成完unsigned ll~范围内的数。。。。 16 while(~scanf("%d", &loop_rounds)){ 17 while(loop_rounds--){ 18 int n; 19 scanf("%d", &n); 20 printf("%I64u\n", f[n-1]); 21 } 22 } 23 return 0; 24 }
标签:style blog http ar io color sp for on
原文地址:http://www.cnblogs.com/wbstackpop/p/4170039.html