Hermoine and Hagrid
CodeChefOpen on judge ↗
Hermoine was roaming around the campus grounds and met Hagrid. Looking at his troubled face, she asked of his problem. Hagrid told her the task Dumbledore had given him. Given a number, Hagrid has to find out the nearest Fibonacci number to it. Being a veteran Code Champion, help Hagrid by writing a program for this task. Input The first line of the input contains the number of strings(T)
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