[Community Puzzle] Guessing digits

https://www.codingame.com/training/medium/guessing-digits

Send your feedback or ask for help here!

Created by @Jamproject,validated by @JBM,@crashtestdummy and @Jakque.
If you have any issues, feel free to ping them.

I don’t get why it got so many downvotes, it’s a nice puzzle.

1 Like

Continuing the discussion from [Community Puzzle] Guessing digits:

I don’t understand this task!
What mean " asks Burt if he knows a and b" - Burt try random or try find one by one…
i use to for loop but it seems to be wrong idea.
I don’t understand who find this a and b

The name is slightly misleading as guessing isn’t allowed. They either know the exact digits or have to say they don’t know. As they both start with different information saying that they don’t know tells the other person something so at some point there is only one pair of digits or it’s impossible.

2 Likes

Example: numbers are 2 and 5
Turn 1
Burt is given 7, there are multiple combinations that give a sum of 7 so he doesn’t know which one.
Sarah is given 10, the only combination is 2*5 so she can find out.

Now, let’s consider another example where Burt is given 7. If Sarah doesn’t find the digits on turn 1, then Burt knows for sure that the combination is not (2, 5).

By filling a big chart with the history of what can be discovered at each turn, it kills possibilities turn after turn and some of them become findable at some point.

2 Likes

Indeed, it’s a smart one. But it needs more explainations. Without yours, I would have skip the puzzle.