GUESSING - Number Guessing Game

Please login first to view this problem. :-)

hide comments
jeets: 2020-08-01 14:06:36

AC in one guess !!

coolboy7: 2020-07-25 19:33:41

did you all do this question without writing any code

maahir2: 2020-06-12 10:15:09

Last edit: 2020-06-12 10:15:16
abc_scc: 2020-04-30 06:17:15

n**2 brute force

harry_shit: 2019-11-14 07:03:14

spoj is cool

prateekpandey: 2019-09-30 16:36:08

have some fun ......

roni_roy18: 2019-06-03 08:00:58

Good Fun:)

riyadhrazzaq: 2018-10-02 17:49:41

I guessed the number using brute force. Can someone explain why this is tagged "binary-search" ? How do I solve it using binary search ?

jyotiradityafc: 2018-08-28 19:40:23

Suppose the answer is 121565. In this case, the display will be "6A4B" as all positions are correct hence "6A" and as you can see 1st '1' for 3rd place is wrong, 3rd '1' for 1st place is wrong. Similarly, 4th '5' for 6th place is wrong, 6th '5' for 4th place is wrong but numbers are correct hence "4B".

Another example, suppose 555555 is the answer and you guessed 125536 then the display will be "2A8B". Check it carefully.

slinky: 2018-07-01 20:36:48

0..5 = {0,1,2,3,4,5} = indices of the digits of the guessed and correct number. For example guess[2] is the 3rd digit of guessed number.

Added by:Bin Jin
Time limit:0.100s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Resource:the (first?) "interactive" problem on SPOJ