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 |
Why WA????#include <stdio.h> int main() { int p, e, i, d = 0, count = 1; scanf("%i%i%i%i", &p, &e, &i, &d); while (d != -1) { do p += 23; while (p <= d); while ((p-e) % 28) p += 23; while ((p-i) % 33) p += 644; printf("Case %i: the next triple peak occurs in %i days.\n", count++, p-d); scanf("%i%i%i%i", &p, &e, &i, &d); } return 0; } *** Please post English Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator