提交时间:2026-06-15 20:19:13
运行 ID: 91779
#include <bits/stdc++.h> using namespace std; int main() { int n ; while(cin >> n) { if(n == 0) return 0 ; cout << n * (n + 1) / 2 + 1 << endl ; } return 0; }