Guessing digits


#1

Tricky but not impossible.


#2

It seems quite hard for me. I must be missing something, since my solution fails the last validator, while passing the provided test cases and anything I could come up with.


#3

Hello,

The problem seems insufficiently explained. What happens during a round? Each player gives a pair of digits? Does that mean the number of rounds necessary is the maximum number of rounds to bruteforce the problem (because a player can give the right one first with some luck)?
Also, how can it be IMPOSSIBLE to guess a pair of digits?
Given that we know that a and b are between 1 and 9 included, the number of combinations is small (less than 81).
For instance in test case 8, the sum of digits is 11 and the product 24.
Possible combinations to get a sum of 11: (6,5) (7,4) (8,3) (9,2) => 4 turns
Possible combinations to get a product of 24: (3,8) (4,6) => 2 turns
But the expected result is IMPOSSIBLE, why ?
Is that a mistake and IMPOSSIBLE means that Maggie gave the wrong numbers on the paper and test case 8 is wrong?

Thank you in advance !
Cheers.


#4

It’s a logical problem.

First, she asks Burt if he knows the digits from the set of equations. If there are too many possibilities, he can’t know the right answer, so he has to pass. Then, it’s Sarah’s turn to guess with her own informations.

The trick in this problem is that “passing” constitutes an important information for the other player.

IMPOSSIBLE means that they can guess the pair without taking the risk to fail after the rounds above.


#5

Hi,

My solution passes all the tests but the Validator 2 failed.

Can someone give me a clue for this validator ?

Thx


#6

couldn’t find a useful hint to tell, so I sent you the validator.
Let us know what failed :slight_smile:


#7

Hi _CG_Thibaud,

It’s all right, I managed to pass all the validators :grinning:

My solution was really too complicated. I wasn’t inspired…
I wrote a better one from scratch that I’ve published.

Thank you so much :wink:

P.S. : Your email was sent to an address I changed a long time ago.
Do you know someone who can fix that ?


#8

cool news.

About the email, it’s the one related to your Discourse account, created the first time you entered the CG forum. You can change it here: https://www.codingame.com/forum/u/NonoLeRobot/preferences/account