Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
1294 | wsy18287021689 | [在线测评解答教程] 求和 | C++ | Accepted | 1 MS | 252 KB | 154 | 2022-11-24 22:06:46 |
#include<bits/stdc++.h> using namespace std; int main() { int n; while (scanf("%d",&n)!=EOF) { printf("%d\n",n*(n+1)/2); } return 0; }