Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
99536 蔡佳轩 斐波那契数列 C++ Compile Error 0 MS 0 KB 308 2024-11-30 11:31:26

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int a=1,b=1,c; int k; cin>>k; for(int i=1;i<=k;i++){ if(i==1 || i==2){ cout<<a; } else{ c = a+b; a = b; b = c; } } cout<<c; } }


Run Info:

Main.cc:20:1: error: expected declaration before '}' token
 }
 ^