| ||||||||||
| 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 | |||||||||
为什么是WA??????#inlcude<iostream>
using namespace std;
int main()
{
int j,p,e,i,d,k;
for(j=1;;j++)
{
cin>>p>>e>>i>>d;
if(p==-1&&e==-1&&i==-1&&d==-1)
break;
for(k=p+23;;k+=23)
{
if(k>d)
if(k>e && (k-e)%28==0)
if(k>i && (k-i)%33==0)
break;
}
cout<<"Case "<<j<<": the next the next triple peak occurs in "<<k-d<<" days."<<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