Run ID:141474
提交时间:2025-12-25 15:11:08
#include <iostream> //designed by hu 2025-10 using namespace std; int main(){ int k; cin >> k; int a = 1; int b = 1; // cout << "NO 1:"<< a <<endl; // cout << "NO 2:"<< b <<endl; if (k==1) { cout<<1; return 0; //结束程序 } if (k==2) { cout<<1; return 0; //结束程序 } int c; for(int i=1;i<= k-2 ;i++) { c = a + b; // cout << "NO "<< i+2 <<":"<< c <<endl; a = b; b = c; } cout << c; /* Input 19 Output 4181 */ return 0; }