|
|
back to boardsandro, plzzz look on test 1 from the example, i think it is 135 + 19(18.25) * 1 = 154 not 155 :p :) thank you Edited by author 05.11.2007 17:26 Re: sandro, plzzz look on test 1 from the example, i think it is 135 + 19(18.25) * 1 = 154 not 155 :p ok? Edited by author 05.11.2007 18:09 Re: sandro, plzzz look on test 1 from the example, i think it is 135 + 19(18.25) * 1 = 154 not 155 :p for this i have WA1 plzz help me :(( Both examples and all the tests are correct. Read the statement more carefully. "The number of minutes in a call is rounded up (i.e., a call with duration of 8:10 is charged the same as a call with duration of 9:00)". So the total time in the 1'st example is 1+10+7+2=20 minutes (the call that lasts 00:05 is ignored). Re: Both examples and all the tests are correct. Read the statement more carefully. Thank you very much... :D thank you... Re: Both examples and all the tests are correct. Read the statement more carefully. Now I get WA4 :((((((( can you look on my code(I will delete it otherwise): #include <stdio.h> #include <math.h> long n1, c1, n2, t, c2, n3, nr, i, mnt, p1; char s[16]; int main() { #ifndef ONLINE_JUDGE freopen("1576.in", "r", stdin); freopen("1576.out", "w", stdout); #endif scanf("%ld%ld", &n1, &c1); scanf("%ld%ld%ld", &n2, &t, &c2); scanf("%ld", &n3); scanf("%ld", &nr); for (i = 1;i <= nr; ++i) { scanf("%s", s); mnt =(((long)s[0] - '0') * 10 + ((long)s[1] - '0')) * 60 + ((long)s[3] - '0') * 10 + ((long)s[4] - '0'); if (mnt > 6) { if (mnt % 60 != 0) { p1 = p1 + mnt / 60 + 1; } else { p1 = p1 + mnt / 60; } } } printf("Basic: %ld\n", n1 + p1 * c1); printf("Combined: %ld\n", (n2 + p1 - t) * c2); printf("Unlimited: %ld\n", n3); return 0; } Edited by author 06.11.2007 22:06 Edited by author 06.11.2007 22:07 Re: Both examples and all the tests are correct. Read the statement more carefully. thank you?! |
|
|