| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150162 | 张晓冉 | 青蛙跳台阶 | C++ | Wrong Answer | 1 MS | 268 KB | 403 | 2026-03-22 17:40:11 |
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ long long a[41] = {0, 1, 2, 4}; int n; long long q = 0; cin >> n; if (n==0) { cout<<0; return 0; } else{ for (int i = 4; i <=n; i++) { a[i] = a[i-3] + a[i-1] + a[i-2]; } cout << a[n]; } return 0; }
------Input------
40
------Answer-----
549755813888
------Your output-----
23837527729