Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
30502 | 承诺 | [在线测评解答教程] 求和 | C++ | Wrong Answer | 0 MS | 240 KB | 154 | 2023-11-10 15:25:08 |
#include<iostream> using namespace std; int main(){ int n,i=1,ans=0; cin>>n; while(i<=n){ ans+=i; i++; } cout<<ans; return 0; }