Tricky but not impossible.

# Guessing digits

**anon-ymous**#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.

**Sylver**#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.

**_CG_Thibaud**#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.

**NonoLeRobot**#5

Hi,

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

Can someone give me a clue for this validator ?

Thx

**_CG_Thibaud**#6

couldnâ€™t find a useful hint to tell, so I sent you the validator.

Let us know what failed

**NonoLeRobot**#7

Hi _CG_Thibaud,

Itâ€™s all right, I managed to pass all the validators

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

P.S. : Your email was sent to an address I changed a long time ago.

Do you know someone who can fix that ?

**_CG_Thibaud**#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

**imq**#10

Provided Burt and Sarah have many possibilities to guess in the first round. Who will be the first to guess like test 3? What is the rule to guess a digit among many possibilities?

Thanks.

**RoboStac**#11

On each turn a player only has two possible actions. They can either say the correct digits or pass to the next player.

**imq**#12

I donâ€™t quite understand the flow and the rule to make a guess. There are many possibility to guess. Which one will be chosen to guess first. Could you please elaborate about Test 3.

Given Burt has sum 7 while Sarah has product 6.

The possibilities of Burt are (1,6) (2,5) (3,4) while Sarahâ€™s are (1,6) (2,3) that resulting (1,6) SARAH 3. What is the flow of the game.

Many thanks!

**NonoLeRobot**#13

Iâ€™ve found how to change it.

My old mail was still used for the notificationsâ€¦

Thx Thibaud

**AchrafLy**#14

Given all the numbers x and y in all the tests, there is always a solution a and b for sum and product. How can some tests be IMPOSSIBLE, given that Brut or Sarah will guess many times and they will probably have it right early or late. Please any clarification

**Zener**#15

RoboStac said :

On each turn a player only has two possible actions. They can either say the correct digits or pass to the next player.

in other words, if a player is unsure of his answer, he is not allowed to respond at random.