This question already has an answer here:
- mathpack numeric literals 3 answers
Write program which finds shortest expression for big integer.
Expression may consist of
+ - * / ^ ! ( ) operations.
! stands for factorial,
^ - exponentiation,
/ - rational division.
Number itself should be printed when no shorter expression found.
7 - 7 120 - 5! 19683 - 3^9 191102976 - 4!^6
Code which is able to find shortest expression within 10 minutes or faster for each unsigned 64-bit number.