| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 6119 | zhuangshuyi | 小明养猪的故事 | C++ | Wrong Answer | 0 | 0 MS | 248 KB | 284 | 2020-08-23 19:51:14 |
#include<bits/stdc++.h> using namespace std; int t,n,a=1,b=2,c; int yangzhu(int x){ if(x==1) cout<<1<<endl; for(int i=2;i<n;i++){ c=b; b=a+b; a=c; } cout<<b<<endl; } int main(){ cin>>t; for(int i=0;i<t;i++){ cin>>n; yangzhu(n); } return 0; }