Human Calculators
CodeChefOpen on judge ↗
Alice and Bob are siblings who are very good at calculating things. Both of them have set world records and are known as 'the human calculators'. Bob is faster at calculating things but Alice is better at mathematics. One day Bob challenged Alice to calculate f(n), where f(n) = 1n × 2n-1 × 3n-2 × ... × (n-1)2 × n Alice knew that Bob's math is weak, so she said, "This is too easy for me. I will
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