| ||||||||||
| 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 | |||||||||
Re:这题题目没说清楚!!!按题义应该这么做才对!In Reply To:这题题目没说清楚!!!按题义应该这么做才对! Posted by:afc163 at 2006-03-26 11:31:30 #include<iostream>
using namespace std;
int main()
{
int n,m,p,c;
while(1)
{
cin>>n>>m>>p>>c;
if(n==0&&m==0&&p==0&&c==0)
return 1;
if(m>p)
cout<<n-m+p<<endl;
else
cout<<n+c<<endl;
}
return 1;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator