Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:附上代码

Posted by donglihe at 2021-06-12 19:58:57 on Problem 1006
In Reply To:附上代码 Posted by:LXY5201314 at 2018-01-20 22:09:28
> #include<stdio.h>
> int main()
> {
>     int p,e,i,d,k=1,a;
>     while(scanf("%d%d%d%d",&p,&e,&i,&d)!=EOF)
>     {
>         if(p==-1&&e==-1&&i==-1&&d==-1)break;
>         a=((5544*p+14421*e+1288*i)-d)%21252;
>         if(a<=0)a+=21252;
>         printf("Case %d: the next triple peak occurs in %d days.\n",k++,a);
>     }
>     return 0;
> }

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator