| ||||||||||
| 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...谁能贴些BT的测试数据给我啊。感觉...为什么...唉...#include "iostream.h"
int main()
{
long p , e , i , d;
long s;
long caseCount = 0;
cin >> p >> e >> i >> d;
while( p>=0 || e>=0 || i>=0 || d>=0 )
{
caseCount++;
s = i + 33;
while( s < e || s < p || ( ( s - e ) % 28 != 0 ) || ( ( s - p ) % 23 != 0 ))
{
s += 33;
}
cout<<"Case "<<caseCount<<": the next triple peak occurs in "<<s-d<<" days."<<endl;
cin >> p >> e >> i >> d;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator