GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   GFY: Math Challenge #2 (https://gfy.com/showthread.php?t=137918)

kevinale 05-28-2003 06:46 PM

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>

buddyjuf 05-28-2003 06:56 PM

holy fuck, this could be an all-nighter

Lane 05-28-2003 06:56 PM

"0" is one possible answer

was it supposed to be a non-negative non-zero integer?

gezzed 05-28-2003 06:57 PM

219978 X 4 = 879912

kevinale 05-28-2003 06:57 PM

Quote:

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

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

buddyjuf 05-28-2003 06:58 PM

Quote:

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

Spunky 05-28-2003 06:58 PM

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

:glugglug

SetTheWorldonFire 05-28-2003 06:58 PM

0 through 9 :Graucho

gezzed 05-28-2003 07:01 PM

Quote:

Originally posted by SetTheWorldonFire
0 through 9 :Graucho
only 0 works

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

etc.

kevinale 05-28-2003 07:04 PM

Quote:

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?

buddyjuf 05-28-2003 07:04 PM

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

gezzed 05-28-2003 07:13 PM

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

kevinale 05-28-2003 07:16 PM

Quote:

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

michaelw 05-28-2003 07:19 PM

2178
21978
219978

amateurs

michaelw 05-28-2003 07:20 PM

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


kevinale 05-28-2003 07:20 PM

Quote:

Originally posted by michaelw
2178
21978
219978

amateurs

Those be them.. God job.

Lane 05-28-2003 07:23 PM

2178
21978
219978
2199978
21999978
219999978
2199999978
etc..

Lane 05-28-2003 07:23 PM

shit, micheal beat me :)

michaelw 05-28-2003 07:29 PM

Quote:

Originally posted by Lane
shit, micheal beat me :)
:glugglug


All times are GMT -7. The time now is 07:04 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123