|
|
back to boardpretty good program but WA on 3 test what the fucking test is it? #include <stdio.h> #include <math.h> long int n, k, hour; double x, y; int main(void) { scanf("%ld%ld", &n, &k); if (n == 1) { printf("0\n"); return 0; } n--; x = floor(log(k)/log(2)) + 1; y = pow(2, x) - 1; n -= y; hour = x; hour += n / k; if (n % k != 0) hour++; printf("%ld\n", hour); return 0; } What the fucking test. I test this program on sophisticated tests but vsio katu pod xvost. :-P Re: pretty good program but WA on 3 test what the fucking test is it? if you find your mistake, please tall me. Re: pretty good program but WA on 3 test what the fucking test is it? Posted by Medium 23 Jul 2007 06:47 I got WA#3 first, but now - AC. Try K>N into your program. |
|
|