| ||||||||||
| 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啊!#include<stdio.h>
int main(){
long m ,count=0;
long a,b,c,d;
while(1){
count++;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a == -1){
break;
}
int br = 1;
for(m = 0 ;br;m++){
int t = 33*m +a;
if((t-a)%23==0 && (t-b)%28 ==0 && t>d){
printf("Case %d: the next triple peak occurs in %d days.\n",count,t-d);
br = 0;
}
}
}
return 0 ;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator