GeeksforGeeks » GPuzzles

10 digit problem

(9 posts)
  • Started 1 year ago by piyush
  • Latest reply from masterrajwadhwa

Tags:

  1. piyush
    guest
    Posted 1 year ago #

    device a 10 digit number such that

    a] each digit represents the number of zeros following it(eg 9000000000)
    b] such that sum of non zero digits in this number is maximum

    from my side the answer is 5555500000, please suggest if there is a better
    answer

  2. Anil Gowda
    Member
    Posted 1 year ago #

    9999500000

  3. varunkumar
    guest
    Posted 1 year ago #

    1111111110
    This is the only solution possible.
    bcoz last digit will always be 0
    so 2nd last has to be 1
    so 3rd last also has to be 1
    and so on....

  4. Nitin
    guest
    Posted 1 year ago #

    The best answer appears to be 5555500000, as this gives the maximum sum of the non-zero digits.

  5. Bharat
    guest
    Posted 1 year ago #

    @piyush your answer is right.

  6. Anand
    guest
    Posted 10 months ago #

  7. Timer
    guest
    Posted 6 months ago #

    @Varun Kumar your answer is right.
    if considering solution 55555(0)0000....the zero inside brackets implies there should be no zero after it.
    so the only solution possible is 1111111110

  8. Rajat
    guest
    Posted 4 months ago #

    Why can't the answer be "9000000000"

  9. Raj
    Member
    Posted 2 months ago #

    what about 1010101010?
    1st 1 means 1 zero will follow it
    After that, 0 implies zero 0's follows it.
    Repeating like that, we will get 1010101010. (If we are talking about zeros directly following the previous digit.)


Reply

You must log in to post.

RSS feed for this topic