Pass or Fail
Chef is struggling to pass a certain college course. The test has a total of $N$ questions, each question carries $3$ marks for a correct answer and $-1$ for an incorrect answer. Chef is a risk-averse person so he decided to attempt all the questions. It is known that Chef got $X$ questions correct and the rest of them incorrect. For Chef to pass the course he must score at least $P$ marks. Wil
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