ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1131. Copying

pretty good program but WA on 3 test what the fucking test is it?
Posted by Astalavista_Baby 15 Sep 2004 18:11
#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?
Posted by CSE_Group 19 Feb 2006 18:58
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.