Блог пользователя ghoshsai5000

Автор ghoshsai5000, история, 8 лет назад, По-английски

I have tried to solve The Table Tennis Question but I got the following mistake.

When k = 666666, a= 6666666, b= 666665

The answer is -1. But, I don't understand why the answer isn't 10. The given configuration is reachable if one player wins ten sets and scores 6666660 and then 6 more points while his opponent scores that many points. Why is the answer -1 in this case ?

Thanks.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hi. In this test Misha really won in 10 set, but they did not finish one more set. After 10 games Misha has 6 points, and Vanya 666665 points (or less), which is less than 666666 (number k). It turns out that they could not finish the 11th set, but according to the condition the game should end at the time of the end of the last set. Ie such a situation is impossible.

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I see. I did not get notified of your post so I did not see it.

    Can you tell me what the answer would be if,

    k = 10, a = 27, b = 35.

    Is it 2 + 3 = 5 or is it -1 because the 6th set is incomplete ?

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      If k = 10, a = 27, b = 35, answer is 5.

      Examle: Set 1: 10 5, Misha won Set 2: 10 0, Misha won Set 3: 7 10, Vanya won Set 4: 0 10, Vanya won Set 5: 0 10, Vanya won

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Thanks for your post.