Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
152721 鲁博睿 上台阶 C++ Compile Error 0 MS 0 KB 227 2026-05-01 20:36:36

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; long long a[50] = {0,1,2,4} int main() { int n,a=1,b=2,c=4,d; cin>>n; for(int i=4;i<=n;i++){ a[i] = a[i-1]+a[i-2]+a[i-3]; } cout<<a[n]<<endl; return 0; }


Run Info:

Main.cc:4:1: error: expected ',' or ';' before 'int'
 int main() {
 ^