标签:script 代码 init 博弈 targe des otto target scan
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2516
题目:
1 #include <cstdio> 2 3 int n; 4 int a[55]; 5 6 void init() { 7 a[0] = 2, a[1] = 3; 8 for(int i = 2; i <= 45; i++) { 9 a[i] = a[i-1] + a[i-2]; 10 } 11 } 12 13 int main() { 14 init(); 15 while(~scanf("%lld", &n) && n) { 16 int flag = 1; 17 for(int i = 0; i <= 45; i++) { 18 if(a[i] == n) { 19 puts("Second win"); 20 flag = 0; 21 break; 22 } 23 } 24 if(flag) puts("First win"); 25 } 26 return 0; 27 }
标签:script 代码 init 博弈 targe des otto target scan
原文地址:https://www.cnblogs.com/Dillonh/p/8996374.html