Run ID:99513
提交时间:2024-11-30 08:12:45
#include<iostream> using namespace std; int main(){ int k; int a=1,b=1,c; cin>>k; if(k==1 || k==2){ cout<<1; } else{ for(int i=3;i<=k;i++){ c=a+b; a=b; b=c; } } cout<<c; return 0; }