| ||||||||||
| 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 | |||||||||
我的怎么不对呢。帮我研究研究吧。#include<iostream>
using namespace std;
int main()
{
int p,e,i,d,x,n;
cin>>p>>e>>i>>d;
x=i;n=1;
while(p!=-1&&e!=-1&&i!=-1&&d!=-1)
{
while(!((x-p)%23==0&&(x-e)%28==0))
x+=33;
if(x!=0)
cout<<"Case "<<n<<": the next triple peak occurs in "<<x-d<<" days."<<endl;
else
cout<<"Case "<<n<<": the next triple peak occurs in "<<21252-d<<" days."<<endl;
n++;
cin>>p>>e>>i>>d;
x=i;
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator