| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 156187 | 任艺宸 | 上台阶 | C++ | Wrong Answer | 0 MS | 276 KB | 381 | 2026-06-27 09:08:32 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[41]={1,2,4},n; cin>>n; for(int i=a[2];i<n;i++){ a[i]=a[i-1]+i; }cout<<a[n-1]; return 0; }
------Input------
15
------Answer-----
5768
------Your output-----
99