| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 70827 | sh25_wangsj | 菲波那契数 | C++ | Accepted | 0 MS | 252 KB | 343 | 2025-10-21 19:06:03 |
#include<bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int b=1,c=1; for(int i=0;i<a-2;i=i+1){ if(i%2==0) { b=b+c; } else{ c=b+c; } } if(a%2==0){ cout<<c; } else{ cout<<b; } return 0; }