标签:clu images script sam pre 输出 mis include tom
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 73139 Accepted Submission(s): 26257
1 //#define MY_DEBUG 2 3 #include <iostream> 4 #include <cstdio> 5 using namespace std; 6 7 int main() 8 { 9 #ifdef MY_DEBUG 10 freopen("./in.txt", "r", stdin); 11 //freopen("./out.txt", "w", stdout); 12 #endif // MY_DEBUG 13 14 __int64 fib[55]; 15 fib[1] = 1; 16 fib[2] = 1; 17 int i; 18 for (i = 3; i < 50; ++i) { 19 fib[i] = fib[i - 1] + fib[i - 2]; 20 } 21 22 int T, a, b; 23 scanf("%d", &T); 24 25 while (T--) { 26 scanf("%d%d", &a, &b); 27 printf("%I64d\n", fib[b - a + 1]); 28 } 29 30 return 0; 31 }
标签:clu images script sam pre 输出 mis include tom
原文地址:http://www.cnblogs.com/bofengyu/p/6731464.html