AMIT AND HIS FACTORIAL STRATEGY
CodeChefOpen on judge ↗
Chef Amit is learning factorial. After learning, he noticed that the number of digits in factorials of numbers are increasing rapidly. For example, 5! has 3 digits (120) while 7! has 4 digits (5040). Now he is curious in finding the number of digits in x! where x is a number input. Help him find it. Definition : Factorial is defined as x!=x.(x-1).(x-2)...3.2.1 i.e. product of all numbers from
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