Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
AC了的人帮我帮帮!!搞不懂哦!!为什么总是wa了,哇了5次了。。谢谢!!! #include<iostream> using namespace std; int main() { long T,N; while((cin>>T>>N)&&T!=0) { char str[15]; long i,k; long sum=0,max; for(i=0;i<T;i++) { cin>>str; cin>>k; sum+=k; } max=T*N; if(N!=0) cout<<max-sum<<endl; else cout<<"0"<<endl; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator