Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
33211 | qwertyuiop | 【入门】数列求值4 | C++ | 通过 | 0 MS | 252 KB | 186 | 2023-12-24 14:22:00 |
#include<bits/stdc++.h> using namespace std; int main(){ long long n,ans=0;cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=i;j++){ ans+=j; } } cout<<ans; return 0; }