Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79878 黄睿杰 [在线测评解答教程] 求和 C++ Accepted 1 MS 272 KB 167 2024-07-10 19:44:33

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int s=0; for(int i=1;i<=n;i++) s+=i; cout<<s<<endl; } return 0; }