← All problemsSign in

Credit Collection

Jaimin is struggling to pass his classes. He has 0 credits right now The semester has a total of N courses, each course carries 3 credits that are added to Jaimin’s credits if he passes the course, otherwise he fails and his credits decrease by one. Jaimin is a risk-averse person so he decided to attempt all the courses. It is known that Jaimin passed X courses and the rest of them he failed. Fo

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