Bob and the Examination
CodeChefOpen on judge ↗
Bob is appointed as an invigilator for an examination. In the examination hall there are $N$ students with roll number $1$ to $N$ and $N$ benches. The seating arrangement is as follows: first all odd roll number students are seated and then all even roll number students. Bob wants to know the roll number of the student sitting on $K^{th}$ bench. Since Bob is weak at maths he needs your help. ***
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