close

GUESSING - Number Guessing Game


Please login first to view this problem. :-)


hide comments
Image tejaswini_526: 2023-11-08 14:37:45

HEY I"M GOING CRAZY HOW THE HELL THE ANSWER IS "LIFE IS LIKE A BOX OF CHOCOLATES. YOU NEVER KNOW WHAT YOU'RE GONNA GET." ? PLEASE SOMEONE TELL ME BEFORE I DIE....

Image tsiroluce1639: 2022-07-19 14:55:53

the tag is right. the method to get is really good. it's not really easy or really hard to think of.

Image jeets: 2020-08-01 14:06:36

AC in one guess !!

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

did you all do this question without writing any code
??

Image abc_scc: 2020-04-30 06:17:15

n**2 brute force

Image harry_shit: 2019-11-14 08:03:14

spoj is cool

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

have some fun ......

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

Good Fun:)

Image 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 ?

Image 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.


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