#include<bits/stdc++.h> using namespace std; // const int N=1e6+10; signed main(){ int _=1; // cin>>_; while (_--) { int ans=0,x; while(cin>>x){ if(x==-1) break; ans+=x; } cout<<ans; } }
注册一个 UIT OnlineJudge 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 UIT OnlineJudge 通用账户