标签:namespace accept scanf ssi 数据 超级 using 个数 测试
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 58070 Accepted Submission(s): 29503
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 int dp[45]; 15 dp[1] = 1; 16 dp[2] = 1; 17 int i; 18 for (i = 3; i <= 40; ++i) { 19 dp[i] = dp[i - 1] + dp[i - 2]; 20 } 21 22 int N, M; 23 scanf("%d", &N); 24 25 while (N--) { 26 scanf("%d", &M); 27 printf("%d\n", dp[M]); 28 } 29 30 return 0; 31 }
标签:namespace accept scanf ssi 数据 超级 using 个数 测试
原文地址:http://www.cnblogs.com/bofengyu/p/6731486.html