Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
24519 | LeoWang | 求和 | C++ | Accepted | 0 MS | 248 KB | 161 | 2023-08-14 01:47:32 |
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int cnt=0; for(int i=1;i<=n;i++){ cnt+=i; } cout<<cnt; return 0; }