My current prefix approach (will hopefully golf further), will add an explanation soon:.
I am confidentthink that _M.__Q
is golfable, working on a solution.
#Explanation
+*tlQsQssM+_M.__Q._ - Full program that reads a String from STDIN, with implicit input.
tlQ - Length of the input - 1.
sQ - The input converted to an integer.
* - Product of the above two elements. We will call this P.
._ - Prefixes of the input.
+ - Concatenated with:
_M.__Q - The prefixes of the reversed input, reversed.
sM - Convert each to an integer.
s - Sum.
+ - Addition of the product P and the sum above.