![]() |
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> |
holy fuck, this could be an all-nighter
|
"0" is one possible answer
was it supposed to be a non-negative non-zero integer? |
219978 X 4 = 879912
|
Quote:
There are two other answers too that are smaller integers. Can you get them? |
Quote:
show me the script? |
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 |
0 through 9 :Graucho
|
Quote:
1 x 4 = 4 which is not 1 reversed 2 x 4 = 8 which is not 2 reversed etc. |
Quote:
Give up? |
for sure I give up,
I just want to know what kind of script would solve that question =) |
I'll post perl source either today or tomorrow. Not that difficult.
|
Quote:
<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 |
2178
21978 219978 amateurs |
One minute VB code:
Code:
Dim zNew As Variant |
Quote:
|
2178
21978 219978 2199978 21999978 219999978 2199999978 etc.. |
shit, micheal beat me :)
|
Quote:
|
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