King and his 100 slaves

A king has 100 identical servants, each with a different rank between 1 and 100. At the end of each day, each servant comes into the king's quarters, one-by-one, in a random order, and announces his rank to let the king know that he is done working for the day. For example, servant 14 comes in and says "Servant 14, reporting in."

One day, the king's aide comes in and tells the king that one of the servants is missing, though he isn't sure which one.
Before the other servants begin reporting in for the night, the king asks for a piece of paper to write on to help him figure out which servant is missing. Unfortunately, all that's available is a very small piece that can only hold one number at a time. The king is free to erase what he writes and write something new as many times as he likes, but he can only have one number written down at a time.
The king's memory is bad and he won't be able to remember all the exact numbers as the servants report in, so he must use the paper to help him.
How can he use the paper such that once the final servant has reported in, he'll know exactly which servant is missing?

Replies

  • nareshkumar6539
    nareshkumar6539
    When servant comes for reporting king adds his value to previous servant number like this king add all servant numbers present(total 99 numbers present at that day) at that day and to get which servant is missed he will subtract this value from sum of first 100 numbers.
    Missing Servant Number=Sum of First 100 numbers - Sum of 99 Numbers present at that day
  • Vivien.hugo
    Vivien.hugo
    Recently, such similar questions seems to come out frequently.
  • Prashanth_p@cchi
    Prashanth_p@cchi
    nareshkumar6539
    When servant comes for reporting king adds his value to previous servant number like this king add all servant numbers present(total 99 numbers present at that day) at that day and to get which servant is missed he will subtract this value from sum of first 100 numbers.
    Missing Servant Number=Sum of First 100 numbers - Sum of 99 Numbers present at that day
    You're Right 😀

You are reading an archived discussion.

Related Posts

Can Anyone please post Solid Edge v 20 tutorials .. I have searched internet but coulldnt get any :S
Well I am a retd Equine race horse vet. worked with horses for around 33yrs. IT helped in my professon in calculating the horse nutrition requirements on a software prepare...
I'm wondering how to be cunning in associating with other people? Do you have good ideas?
I have done my B tech in Mechanical from NIT Nagpur .. with GPA well above 6 .. I have done training but no intern .. and I appeared for...
After Karnataka and Kolkata, the cities blessed with 4G services include Delhi, Mumbai, Haryana and Kerala by 2014, and should be fully operational by 2014. Read more of it in...