FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Programming Challenge





restonpiston
Hi, I was looking at youtube videos haphazardly and stumble upon this one:


Here they explain a cool way to decompose numbers but they don't know the method to do that.
The decomposition rules are as follows:

    You can only use one type of number from 1 to 9

    You can only use operations of sum, subtraction, multiplication, division, exponentiation and concatenation

    You must look for the shortest expression

Using this rules you can decompose 814 in:
22*(2+2+2)^2+22

I thought about it for a bit and realize that it would be an interesting challenge for many people.

So here is my idea, post your solution of the problem if you have one and we will discuss it against the others.
I dont have the solution myself, so it would be challenge for me. Also, use your favourite language,
but if you don't mind, make it in python so we all have a common syntaxis.

Have fun!
Related topics
How To : Improve Your PHP Programming
Java Programming Introductory
Laws of Computer Programming
Programming Help & Support Guidelines
Programming
Programming links, info, and tutorials
xcode programming
falling in love
A wonderful place to learn CGI-programming
programming
basic tutorials on most forms of web programming
Games programming...
[Visual Basic] Divide X equation
13-digit Palindromic Primes
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.