标签:des style blog io color for sp 数据 div
1 #include <stdio.h> 2 3 int main(){ 4 int T; 5 int number; 6 int a; 7 int b; 8 int result; 9 int i; 10 11 scanf("%d",&T); 12 13 while(T--){ 14 scanf("%d",&number); 15 16 if(number==1){ 17 printf("0\n"); 18 continue; 19 } 20 21 else if(number==2){ 22 printf("1\n"); 23 continue; 24 } 25 26 else if(number==3){ 27 printf("2\n"); 28 continue; 29 } 30 31 a=1; 32 b=2; 33 for(i=1;i<=number-3;i++){ 34 result=a+b; 35 a=b; 36 b=result; 37 } 38 39 printf("%d\n",result); 40 } 41 42 43 return 0; 44 }
标签:des style blog io color for sp 数据 div
原文地址:http://www.cnblogs.com/zqxLonely/p/4057970.html