| ||||||||||
| 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 | |||||||||
是不是做错了?这么做?竟然过了!In Reply To:40 70 50 20 这个sample, customer 用了20块的真钞,得到了价值40块的物品和20块的零钱,那jame的损失不是40块么?怎么是20,难道零钱是假的? Posted by:sunmoonstar_love at 2005-07-31 12:34:07 #include<iostream.h>
int main(void)
{
int N,M,P,C;
while(cin>>N>>M>>P>>C)
{
if(N==0 && M==0 && P==0 && C==0)break;
cout<<-(M-N-P)<<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