| ||||||||||
| 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<stdio.h>
#include<stdlib.h>
int main()
{
int p,e,i,j,k,d,a,n,m;
int count=0;
while(1)
{
scanf("%d,%d,%d,%d",&p,&e,&i,&d);
if(p==-1)break;
count++;
for(i=28*33;i<21252;i+33)
{
if(i%23==p)
break;
}
for(j=23*33;j<21252;j+33)
{
if(j%28==e)
break;
}
for(k=23*28;k<21252;k+28)
{
if(k%33==i)
break;
}
a=23*28*33;
n=i*j*k;
m=n%a;
printf("Case %d: the next triple peak occurs in %d days.",count,m-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