Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
137505 芦睿霖 12for循环练习I C++ Wrong Answer 1 MS 264 KB 166 2025-11-18 15:46:55

Tests(0/10):


Code:

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


Run Info:

------Input------
4
------Answer-----
1 2 3 4
------Your output-----
10