Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
24394 | 王皓暄 | [在线测评解答教程] 求和 | C++ | Presentation Error | 1 MS | 244 KB | 199 | 2023-08-11 17:38:47 |
#include<iostream> using namespace std; int main() { int n; while(cin>>n) { int num=0; for(int i=1;i<=n;i++) { num+=i; } cout<<endl; cout<<num<<endl; } return 0; }