Count Votes
CodeChefOpen on judge ↗
The yearly elections, for the Class Representative, in which three candidates participated, namely $John$, $Reese$ and $Dwight$, have recently ended. $John$ received **x** votes, $Reese$ received **y** votes, $Dwight$ received **z** votes. For each of the candidates, calculate: How many votes should be added to "this" candidate's vote so that he/she wins the CR election, i.e. the number of votes f
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