提交时间:2024-02-22 20:28:38
运行 ID: 41636
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int sum = 0; int i=1; while(i<=n){ sum += i; i++; } cout << sum; return 0; }