Find the number puzzle.

There is a number less than 3000 that when divided by 2 leaves a remainder of 1, when divided by 3 leaves a remainder of 2, when divided by 4 leaves a remainder of 3, When divided by 5 leaves a remainder of 4, when divided by 6 leaves a remainder of 5, and so on up to nine.

What is that number?
Please provide step by step solution to this problem.

Replies

  • kedarjk
    kedarjk
    2519
    I wrote a simple python program to find it out. ๐Ÿ˜‰
  • Ankita Katdare
    Ankita Katdare
    kedarjk
    2519
    I wrote a simple python program to find it out. ๐Ÿ˜‰
    Please share the script, friend! ๐Ÿ˜
  • kedarjk
    kedarjk
    Its no brainer...
    -----------------------------------------
    for i in range (1,3000):
    if i%9==8:
    if i%8==7:
    if i%7==6:
    if i%6==5:
    if i%5==4:
    if i%4==3:
    if i%3==2:
    if i%2==1:
    print "This is the number: "+ str(i)

    -----------------------------------------

    I was curious to check if there is really such number, so wrote a simple script. There must be some other logic to find it out.
  • Anoop Kumar
    Anoop Kumar
    That's an bad programming, number of loops will be 2519.

    This is class 8th problem which is calculated by following method, It's like following

    LCM (reminders) *x - GCD(Numbers) until you find the solution. x is an Integer.

    I don't remember that exact method.
  • Alok mishra
    Alok mishra
    ianoop
    That's an bad programming, number of loops will be 2519.

    This is class 8th problem which is calculated by following method, It's like following

    LCM (reminders) *x - GCD(Numbers) until you find the solution. x is an Integer.

    I don't remember that exact method.
    its n*LCM(divisor)-(difference Between divisor and remainder) , n is any natural number .
  • Anoop Kumar
    Anoop Kumar
    Another example of this question is
    find x such that
    reminder is 2 when divided by 3,
    3 when divided by 4,
    1 when it's 5.
  • smorgasbord
    smorgasbord
    Ankita Katdare
    There is a number less than 3000 that when divided by 2 leaves a remainder of 1, when divided by 3 leaves a remainder of 2, when divided by 4 leaves a remainder of 3, When divided by 5 leaves a remainder of 4, when divided by 6 leaves a remainder of 5, and so on up to nine.

    What is that number?
    Please provide step by step solution to this problem.
    A number when
    divided by 2 leaves a remainder of 1 = divided by 2 leaves a remainder of 1
    divided by 3 leaves a remainder of 2 = divided by 3 leaves a remainder of 1
    divided by 4 leaves a remainder of 3 = divided by 4 leaves a remainder of 1
    divided by 5 leaves a remainder of 4 = divided by 5 leaves a remainder of 1
    .
    .
    .
    . = divided by 9 leaves a remainder of 1

    Which means we need LCM of 2,3,4,5 ( 60 ), 7 ( 420 ), 8 (420*2=840), 9 ( 840*3 ) = 2520 ... and something.

    if we need all the right hand side of the ='s to be set right we need to add one to 2520, but we need all the left hand side of the ='s written above to be true, so need to subtract one from it.
    2519.
  • smorgasbord
    smorgasbord
    Hell! i made an egregious error:
    A number when
    divided by 2 leaves a remainder of 1 = divided by 2 leaves a remainder of -1
    divided by 3 leaves a remainder of 2 = divided by 3 leaves a remainder of -1
    divided by 4 leaves a remainder of 3 = divided by 4 leaves a remainder of -1
    divided by 5 leaves a remainder of 4 = divided by 5 leaves a remainder of -1
    .
    .
    .
    . = divided by 9 leaves a remainder of -1

    Which means we need LCM of 2,3,4,5 ( 60 ), 7 ( 420 ), 8 (420*2=840), 9 ( 840*3 ) = 2520, & -1 = 2519
    sorry. ๐Ÿ˜›

You are reading an archived discussion.

Related Posts

Facebook is soon unveiling a new Unfollow button that will help users to stop receiving feed from their friends they are following. It is a way to filter the news...
After being very adamant about knowing what people are typing in their BBMs, Indian Government is now eyeing all your conversations routing through WhatsApp, Viber, Line and other similar mobile...
Google's Andy Rubin, the man who gave Android to the world has a new project to handle at Google; and boy, it's very interesting. Andy Rubin is focusing all his...
Joke ( humour ) about card issued by govt Operator : "Thank you for calling Pizza Hut . May I have your..." Customer: "Heloo, can I order.." Operator : "Can...
The Dual-Screen Android smartphone called the YotaPhone is finally here. We first saw its debut at the Consumer Electronics Show 2013 and now it is all set to launch in...