Factorial Mania
CodeChefOpen on judge ↗
Magnus is playing a math game with Pinkman. Let's define for positive integer $x$ as a product of factorials of its digits. For example, - $F(135) = 1!*3!*5!$ First, they choose a decimal number $a$ consisting of $n$ digits that contains at least one digit larger than $1$. This number may possibly start with leading zeroes. Then they should find maximum positive number $x$ satisfyi
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start