Run ID:152919

提交时间:2026-05-05 20:10:59

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