← All problemsSign in

Chef And Exam

Chef's exams are coming. He has $K$ days to prepare for it. Chef did not study anything during his semester. He has now $N$ different topics to study. So, Chef decides that every day he will study at least $Pi$ topics and at max $Qi$ topics. He has to complete all $N$ topics. Chef wants to know in how many ways he can do this. Help Chef in figuring it out. Since the answer can be a large value, ou

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start