Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. POTD

POTD

Scheduled Pinned Locked Moved The Lounge
comtoolsquestion
15 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M MoustafaS

    A new and easy puzzle: (1) My wife and I went to a dinner party with four other couples. At the beginning of the party, some people shook hands. (Obviously, no one shook his or her own hand or spouse's hand, and no one shook hands with the same person twice.) During the party I surveyed all the other people as to how many hands each one shook. I got different answers from everyone. What did my wife say? ----------- (2) There are two lengths of rope. Each one can burn in exactly one hour. They are not necessarily of the same length or width as each other. They also are not of uniform width (may be wider in middle than on the end), thus burning half of the rope is not necessarily 1/2 hour. By burning the ropes, how do you measure exactly 45 minutes worth of time? ------------ (3) Given five zeroes, using any mathematical operations, can you make a total of 120? [Parentheses unlimited] ------------ (4) Can you replace the letters in the multiplication sum below to make a valid calculation. Each letter represents one number only and each number is represented by only one letter: TWO TWO * ----- THREE Can you solve all of this ?:-D


    About : Islam
    About : Me

    D Offline
    D Offline
    Daniel Grunwald
    wrote on last edited by
    #3

    (2) You start by burning one rope from both sides and the other rope from one side. After 30 minutes, the first rope will have burnt down completely, and the other rope has 30 minutes left to burn. When you now start burning the other side of the second rope, the second rope will have 15 minutes left to burn, so you get a total of 45 minutes. (3) (0! + 0! + 0! + 0! + 0!)!

    M 1 Reply Last reply
    0
    • M MoustafaS

      A new and easy puzzle: (1) My wife and I went to a dinner party with four other couples. At the beginning of the party, some people shook hands. (Obviously, no one shook his or her own hand or spouse's hand, and no one shook hands with the same person twice.) During the party I surveyed all the other people as to how many hands each one shook. I got different answers from everyone. What did my wife say? ----------- (2) There are two lengths of rope. Each one can burn in exactly one hour. They are not necessarily of the same length or width as each other. They also are not of uniform width (may be wider in middle than on the end), thus burning half of the rope is not necessarily 1/2 hour. By burning the ropes, how do you measure exactly 45 minutes worth of time? ------------ (3) Given five zeroes, using any mathematical operations, can you make a total of 120? [Parentheses unlimited] ------------ (4) Can you replace the letters in the multiplication sum below to make a valid calculation. Each letter represents one number only and each number is represented by only one letter: TWO TWO * ----- THREE Can you solve all of this ?:-D


      About : Islam
      About : Me

      A Offline
      A Offline
      Arun Immanuel
      wrote on last edited by
      #4

      138 * 138 = 19044 Just 5 lines of code revealed 7 possibilities. Of this other 6 are ruled out. for (int i = 100; i < 999; i++) { int res = i * i; if (res % 10 == (res / 10) % 10 && res / 10000 == i / 100) Console.WriteLine(i + " * " + i+ " = " + res); } 100 * 100 = 10000 110 * 110 = 12100 112 * 112 = 12544 120 * 120 = 14400 130 * 130 = 16900 138 * 138 = 19044 140 * 140 = 19600 ;););)

      Regards, Arun Kumar.A

      M 1 Reply Last reply
      0
      • M MoustafaS

        A new and easy puzzle: (1) My wife and I went to a dinner party with four other couples. At the beginning of the party, some people shook hands. (Obviously, no one shook his or her own hand or spouse's hand, and no one shook hands with the same person twice.) During the party I surveyed all the other people as to how many hands each one shook. I got different answers from everyone. What did my wife say? ----------- (2) There are two lengths of rope. Each one can burn in exactly one hour. They are not necessarily of the same length or width as each other. They also are not of uniform width (may be wider in middle than on the end), thus burning half of the rope is not necessarily 1/2 hour. By burning the ropes, how do you measure exactly 45 minutes worth of time? ------------ (3) Given five zeroes, using any mathematical operations, can you make a total of 120? [Parentheses unlimited] ------------ (4) Can you replace the letters in the multiplication sum below to make a valid calculation. Each letter represents one number only and each number is represented by only one letter: TWO TWO * ----- THREE Can you solve all of this ?:-D


        About : Islam
        About : Me

        N Offline
        N Offline
        Nirosh
        wrote on last edited by
        #5

        Let me see your answers, to validate with my answers

        L.W.C. Nirosh. Colombo, Sri Lanka.

        M 1 Reply Last reply
        0
        • D Daniel Grunwald

          (2) You start by burning one rope from both sides and the other rope from one side. After 30 minutes, the first rope will have burnt down completely, and the other rope has 30 minutes left to burn. When you now start burning the other side of the second rope, the second rope will have 15 minutes left to burn, so you get a total of 45 minutes. (3) (0! + 0! + 0! + 0! + 0!)!

          M Offline
          M Offline
          MoustafaS
          wrote on last edited by
          #6

          Right, the two are right, nice.


          About : Islam
          About : Me

          1 Reply Last reply
          0
          • D DavidNohejl

            I'll take just the shortest one ;)

            LongHC wrote:

            (3) Given five zeroes, using any mathematical operations, can you make a total of 120? [Parentheses unlimited]

            (0!+0!+0!+0!+0!)!


            "Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

            M Offline
            M Offline
            MoustafaS
            wrote on last edited by
            #7

            dnh wrote:

            (0!+0!+0!+0!+0!)!

            A very nice one. Think now about the rest.:-D


            About : Islam
            About : Me

            1 Reply Last reply
            0
            • A Arun Immanuel

              138 * 138 = 19044 Just 5 lines of code revealed 7 possibilities. Of this other 6 are ruled out. for (int i = 100; i < 999; i++) { int res = i * i; if (res % 10 == (res / 10) % 10 && res / 10000 == i / 100) Console.WriteLine(i + " * " + i+ " = " + res); } 100 * 100 = 10000 110 * 110 = 12100 112 * 112 = 12544 120 * 120 = 14400 130 * 130 = 16900 138 * 138 = 19044 140 * 140 = 19600 ;););)

              Regards, Arun Kumar.A

              M Offline
              M Offline
              MoustafaS
              wrote on last edited by
              #8

              :laugh:


              About : Islam
              About : Me

              1 Reply Last reply
              0
              • N Nirosh

                Let me see your answers, to validate with my answers

                L.W.C. Nirosh. Colombo, Sri Lanka.

                M Offline
                M Offline
                MoustafaS
                wrote on last edited by
                #9

                They are now.


                About : Islam
                About : Me

                1 Reply Last reply
                0
                • M MoustafaS

                  A new and easy puzzle: (1) My wife and I went to a dinner party with four other couples. At the beginning of the party, some people shook hands. (Obviously, no one shook his or her own hand or spouse's hand, and no one shook hands with the same person twice.) During the party I surveyed all the other people as to how many hands each one shook. I got different answers from everyone. What did my wife say? ----------- (2) There are two lengths of rope. Each one can burn in exactly one hour. They are not necessarily of the same length or width as each other. They also are not of uniform width (may be wider in middle than on the end), thus burning half of the rope is not necessarily 1/2 hour. By burning the ropes, how do you measure exactly 45 minutes worth of time? ------------ (3) Given five zeroes, using any mathematical operations, can you make a total of 120? [Parentheses unlimited] ------------ (4) Can you replace the letters in the multiplication sum below to make a valid calculation. Each letter represents one number only and each number is represented by only one letter: TWO TWO * ----- THREE Can you solve all of this ?:-D


                  About : Islam
                  About : Me

                  M Offline
                  M Offline
                  MoustafaS
                  wrote on last edited by
                  #10

                  As dnh and Daniel Grunwald got it for the 2 and 3, also Arun.Immanuel get the last one right. 1- Not answered yet 2-

                  Daniel Grunwald wrote:

                  You start by burning one rope from both sides and the other rope from one side. After 30 minutes, the first rope will have burnt down completely, and the other rope has 30 minutes left to burn. When you now start burning the other side of the second rope, the second rope will have 15 minutes left to burn, so you get a total of 45 minutes.

                  3- (0! + 0! + 0! + 0! + 0!)! = 120 4- 138 * 138 = 19044 as Arun got it, and he made a good program for it.;) Program here.


                  About : Islam
                  About : Me

                  F 1 Reply Last reply
                  0
                  • M MoustafaS

                    As dnh and Daniel Grunwald got it for the 2 and 3, also Arun.Immanuel get the last one right. 1- Not answered yet 2-

                    Daniel Grunwald wrote:

                    You start by burning one rope from both sides and the other rope from one side. After 30 minutes, the first rope will have burnt down completely, and the other rope has 30 minutes left to burn. When you now start burning the other side of the second rope, the second rope will have 15 minutes left to burn, so you get a total of 45 minutes.

                    3- (0! + 0! + 0! + 0! + 0!)! = 120 4- 138 * 138 = 19044 as Arun got it, and he made a good program for it.;) Program here.


                    About : Islam
                    About : Me

                    F Offline
                    F Offline
                    Fred_Smith
                    wrote on last edited by
                    #11

                    I'm probably being daft by not realising #1 is a joke....!? My guess is she said: "Soemone can'r count!" If you went with 4 other couples there are 10 people in all; if you surveyed everyone else in the room (9 people) and got different answers from each, those answers must have been 0 to 8 inclusive (can't include 9 as no-one shakes hands with their spouse) - but whoever claims to have shaken 8 hands must have shaken hands with everyone apart from their spouse, one of whom said they hadn't shaken any hands... My head hurts... Fred

                    M 1 Reply Last reply
                    0
                    • F Fred_Smith

                      I'm probably being daft by not realising #1 is a joke....!? My guess is she said: "Soemone can'r count!" If you went with 4 other couples there are 10 people in all; if you surveyed everyone else in the room (9 people) and got different answers from each, those answers must have been 0 to 8 inclusive (can't include 9 as no-one shakes hands with their spouse) - but whoever claims to have shaken 8 hands must have shaken hands with everyone apart from their spouse, one of whom said they hadn't shaken any hands... My head hurts... Fred

                      M Offline
                      M Offline
                      MoustafaS
                      wrote on last edited by
                      #12

                      :-D:-D:-D

                      Fred_Smith wrote:

                      one of whom said they hadn't shaken any hands...

                      Therefore that person must be his wife.;P


                      About : Islam
                      About : Me

                      F 1 Reply Last reply
                      0
                      • M MoustafaS

                        :-D:-D:-D

                        Fred_Smith wrote:

                        one of whom said they hadn't shaken any hands...

                        Therefore that person must be his wife.;P


                        About : Islam
                        About : Me

                        F Offline
                        F Offline
                        Fred_Smith
                        wrote on last edited by
                        #13

                        Yeah well I was just about to say that! Except... a wife goes to a dinner party and doesn't shake anyone's hand?! Come on... now if you'd said "My husband I went a party... what did my husband say?" it would have been easy! F :)

                        1 Reply Last reply
                        0
                        • M MoustafaS

                          A new and easy puzzle: (1) My wife and I went to a dinner party with four other couples. At the beginning of the party, some people shook hands. (Obviously, no one shook his or her own hand or spouse's hand, and no one shook hands with the same person twice.) During the party I surveyed all the other people as to how many hands each one shook. I got different answers from everyone. What did my wife say? ----------- (2) There are two lengths of rope. Each one can burn in exactly one hour. They are not necessarily of the same length or width as each other. They also are not of uniform width (may be wider in middle than on the end), thus burning half of the rope is not necessarily 1/2 hour. By burning the ropes, how do you measure exactly 45 minutes worth of time? ------------ (3) Given five zeroes, using any mathematical operations, can you make a total of 120? [Parentheses unlimited] ------------ (4) Can you replace the letters in the multiplication sum below to make a valid calculation. Each letter represents one number only and each number is represented by only one letter: TWO TWO * ----- THREE Can you solve all of this ?:-D


                          About : Islam
                          About : Me

                          M Offline
                          M Offline
                          Marc Clifton
                          wrote on last edited by
                          #14

                          LongHC wrote:

                          What did my wife say?

                          0. Women don't shake hands. They hug and peck. Marc

                          Thyme In The Country
                          Interacx

                          People are just notoriously impossible. --DavidCrow
                          There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                          People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                          M 1 Reply Last reply
                          0
                          • M Marc Clifton

                            LongHC wrote:

                            What did my wife say?

                            0. Women don't shake hands. They hug and peck. Marc

                            Thyme In The Country
                            Interacx

                            People are just notoriously impossible. --DavidCrow
                            There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                            People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                            M Offline
                            M Offline
                            MoustafaS
                            wrote on last edited by
                            #15

                            :-D:laugh:


                            About : Islam
                            About : Me

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups