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 201319025 at 2016-04-27 10:44:52 on Problem 1006
In Reply To:大水题,中国余数定理 Posted by:huzujun at 2013-01-21 09:59:53
> #include<iostream>  
> using namespace std;  
>   
> int main()  
> {  
>     int p,e,i,d;  
>     int time=1;  
>     while(cin>>p>>e>>i>>d)  
>     {  
>         if(p==-1 && e==-1 && i==-1 && d==-1)  
>             break;  
>   
>         int lcm=21252; 
>         int n=(5544*p+14421*e+1288*i-d+21252)%21252;  
>         if(n==0)  
>             n=21252;  
>         cout<<"Case "<<time++<<": the next triple peak occurs in "<<n<<" days."<<endl;  
>     }  
>     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