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<iostream> using namespace std; int main(){ long a,b,c,d,ans,i; i=1; while(1){ cin >> a >> b >> c >> d; if(a == -1)break; ans=(5544*a+14421*b+1288*c-d+21252)%21252; if(ans == 0)ans=21512; cout << "Case "<< i <<": the next triple peak occurs in " << ans << " days." << endl; i++; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator