A simple code that converts numbers (like 7644) to a mathematical expression such as each digit is used one time max (563+7081).
This code uses a bit of the wonderful ExprTk lib (under MIT license) to eval the expressions of the user, useful if you want to convert an expression to an other that respect the rule.
There is also a web demo!
It available at https://lapcoder.github.io/digits/
WARN: YOU MUST UPLOAD A .bin FILE, USE THIS ONE:
https://raw.githubusercontent.com/LAPCoder/digits/refs/heads/main/precalc_5_000_000.bin