All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
my house's number (Posted on 2004-06-21) Difficulty: 3 of 5
My house's number can be written as ABCD but it also equals to A^B * C^D. Find the number ..-no computer programs!!!

See The Solution Submitted by Ady TZIDON    
Rating: 4.5000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(2): Poor AWK people... | Comment 12 of 32 |
(In reply to re: Poor AWK people... by Erik O.)

I'd worry that

If A^B*C^D = A*1000+B*100+C*10+D Then

might fail, as exponentiation uses logarithms rather than multiplication, and is thus subject to rounding errors.  Since it's known that A, B, C and D are integers, it's safe to round to an integer:

If Int(A^B*C^D+.5) = A*1000+B*100+C*10+D Then

so that even if A^B*C^D comes out to 2592.000001 or 2591.999999, a match will still be found.


  Posted by Charlie on 2004-06-22 09:58:02
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information