GFY: Math Challenge #2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kevinale
    Confirmed User
    • Dec 2002
    • 2115

    #1

    GFY: Math Challenge #2

    I'm not gonna make it a night of brain teasers. This is the last one I post.

    Ok. Someone wanted another. So here goes. Pick an integer where four times that number is equal to the original integer whose numbers are reversed.

    For example:

          WXYZ * 4 = ZYXW

    NOTE: I'm not saying that this integer is 4 digits long. It could be any length.

    Good luck.

    <BR><BR><BR><BR><BR><BR><BR>
    <BR><BR><BR><BR><BR><BR><BR>
    <BR><BR><BR><BR><BR><BR><BR>
    1monkey0cup.com
  • buddyjuf

    #2
    holy fuck, this could be an all-nighter

    Comment

    • Lane
      Will code for food...
      • Apr 2001
      • 8496

      #3
      "0" is one possible answer

      was it supposed to be a non-negative non-zero integer?
      Last edited by Lane; 05-28-2003, 06:03 PM.

      Comment

      • gezzed
        Confirmed User
        • Mar 2002
        • 317

        #4
        219978 X 4 = 879912

        Comment

        • kevinale
          Confirmed User
          • Dec 2002
          • 2115

          #5
          Originally posted by gezzed
          219978 X 4 = 879912
          Good one!

          There are two other answers too that are smaller integers. Can you get them?
          1monkey0cup.com

          Comment

          • buddyjuf

            #6
            Originally posted by gezzed
            219978 X 4 = 879912
            whoa!
            show me the script?

            Comment

            • Spunky
              I need a beer
              • Jun 2002
              • 133986

              #7
              none - the hun gets revenue from pre-paid gallery placements on the top 15 spaces and banners. the rest of thegalleries are free placements.

              Comment

              • SetTheWorldonFire
                Confirmed User
                • Feb 2002
                • 7444

                #8
                0 through 9
                www.STWOFDesign.com
                hit me up on icq 154206276 or Skype: JaimeGizzle

                Comment

                • gezzed
                  Confirmed User
                  • Mar 2002
                  • 317

                  #9
                  Originally posted by SetTheWorldonFire
                  0 through 9
                  only 0 works

                  1 x 4 = 4 which is not 1 reversed
                  2 x 4 = 8 which is not 2 reversed

                  etc.

                  Comment

                  • kevinale
                    Confirmed User
                    • Dec 2002
                    • 2115

                    #10
                    Originally posted by gezzed


                    only 0 works

                    1 x 4 = 4 which is not 1 reversed
                    2 x 4 = 8 which is not 2 reversed

                    etc.
                    Yes.. 0 works too. There are two more (I forgot 0)..

                    Give up?
                    1monkey0cup.com

                    Comment

                    • buddyjuf

                      #11
                      for sure I give up,
                      I just want to know what kind of script would solve that question =)

                      Comment

                      • gezzed
                        Confirmed User
                        • Mar 2002
                        • 317

                        #12
                        I'll post perl source either today or tomorrow. Not that difficult.

                        Comment

                        • kevinale
                          Confirmed User
                          • Dec 2002
                          • 2115

                          #13
                          Originally posted by bdjuf
                          for sure I give up,
                          I just want to know what kind of script would solve that question =)
                          I used PERL.. Here is the script I used. It doesn't have the answers.. I'll post them later..

                          <pre>

                          for($i=0; $i<999999; ++$i){
                          if(checkNum($i)){
                          print "ANSWER IS $i\n";
                          #exit(1);
                          }
                          }

                          sub checkNum{
                          $num = shift;
                          $num2 = "";
                          for($j=0; $j<=length($num); ++$j){
                          $num2 .= substr($num, length($num)-$j, 1);
                          }
                          if( ($num*4) hahahaha ($num2*1) ){
                          return 1;
                          }
                          return 0;
                          }
                          </pre>

                          This will print the 4 answers

                          PS: That "hahaha" is the "= =" without the space
                          1monkey0cup.com

                          Comment

                          • michaelw
                            Confirmed User
                            • May 2002
                            • 1342

                            #14
                            2178
                            21978
                            219978

                            amateurs
                            <b><a href="http://www.hotlinkprotector.com"><font color="yellow">Hotlink Protector</font></a> - Protect all your file types from hotlinking the professional way. <br>
                            See a demo <a href="http://www.hotlinkprotector.com/demo.html"><font color="yellow">here</font></a>, and testimonials <a href="http://www.hotlinkprotector.com/testimonials.html"><font color="yellow">here</font></a><br>ICQ: 146423631

                            Comment

                            • michaelw
                              Confirmed User
                              • May 2002
                              • 1342

                              #15
                              One minute VB code:
                              Code:
                              Dim zNew As Variant
                              
                              For x = 1 To 500000
                                  zNew = x * 4
                                  If StrReverse(zNew) = x Then
                                  Debug.Print x
                                  End If
                              Next
                              <b><a href="http://www.hotlinkprotector.com"><font color="yellow">Hotlink Protector</font></a> - Protect all your file types from hotlinking the professional way. <br>
                              See a demo <a href="http://www.hotlinkprotector.com/demo.html"><font color="yellow">here</font></a>, and testimonials <a href="http://www.hotlinkprotector.com/testimonials.html"><font color="yellow">here</font></a><br>ICQ: 146423631

                              Comment

                              • kevinale
                                Confirmed User
                                • Dec 2002
                                • 2115

                                #16
                                Originally posted by michaelw
                                2178
                                21978
                                219978

                                amateurs
                                Those be them.. God job.
                                1monkey0cup.com

                                Comment

                                • Lane
                                  Will code for food...
                                  • Apr 2001
                                  • 8496

                                  #17
                                  2178
                                  21978
                                  219978
                                  2199978
                                  21999978
                                  219999978
                                  2199999978
                                  etc..

                                  Comment

                                  • Lane
                                    Will code for food...
                                    • Apr 2001
                                    • 8496

                                    #18
                                    shit, micheal beat me

                                    Comment

                                    • michaelw
                                      Confirmed User
                                      • May 2002
                                      • 1342

                                      #19
                                      Originally posted by Lane
                                      shit, micheal beat me
                                      <b><a href="http://www.hotlinkprotector.com"><font color="yellow">Hotlink Protector</font></a> - Protect all your file types from hotlinking the professional way. <br>
                                      See a demo <a href="http://www.hotlinkprotector.com/demo.html"><font color="yellow">here</font></a>, and testimonials <a href="http://www.hotlinkprotector.com/testimonials.html"><font color="yellow">here</font></a><br>ICQ: 146423631

                                      Comment

                                      Working...