Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
65758 zyqll [在线测评解答教程] 求和 C++ Accepted 2 MS 272 KB 247 2024-02-09 18:23:18

Tests(10/10):


Code:

#include <iostream> using namespace std; int main() { int n; while (cin >> n) { int result = 0; for (int i=1;i<=n;i++){ result += i; } cout << result << endl; } return 0; }