← All problemsSign in

The Basketball Game

Bob has recently learnt how to play basketball and he was told by Alice that the rules in basketball were as follows : • 1 point for a free throw • 2 points for a throw from within the D • 3 points for a throw from outside the D Being an inquisitive mind that Bob is, he would like to know how many combinations of 1-pointers, 2-pointers and 3-pointers can lead to a team score of N points. Now

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