Lohit and Combinatorics
CodeChefOpen on judge ↗
Problem description. Lohit has come to Quark and joined the Event Numb3rs. He is solving a problem, where he is provided with three integers N,K and R. He is supposed to calculate (N,R) + (N,R+1) + (N+1,R) + (N+2,R) + ..... + (N+K,R). After calculating, if the answer is (A,B), he has to give minimum value of A-B. Can you solve this problem for him? (N,R) denotes number of ways to choose R di
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