Christmas Time
Santa has to distribute gifts in a country which has N towns. He has to distribute exactly M gifts in town 1, M+1 in town 2, M+2 in town 3 and so on. NOTE : Source code limit for this problem is 5KB which is much less compared to default source code limit. In each town, you can assume that there are infinite kids. If he has 3 gifts to be distributed in town 1, he can distribute it in 3 ways: (1
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