Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
120845 | 黎瑾萱 | 上台阶 | C++ | Wrong Answer | 1 MS | 272 KB | 194 | 2025-06-01 10:46:13 |
#include<bits/stdc++.h> using namespace std; int a[51] = {0,1,2,4}; int main(){ int n; cin>>n; for(int i=4;i<=n;i++){ a[i] = a[i-1]+a[i-2]+a[i-3]; } cout<<a[n]; return 0; }
------Input------
40
------Answer-----
23837527729
------Your output-----
-1932276047