Naruto and Jiraiya
CodeChefOpen on judge ↗
Jiraiya took Naruto to a forest in the Leaf Village for his training. The forest had N trees indexed from 1 to N each of which has some amount of Chakra in it. The amount of chakra in the ith tree is the number of fibonacci numbers which are less than the ith fibonacci number and are coprime to the ith fibonacci number. Fibonacci numbers are defined as :- F1 = 1, F2 = 1 and Fi = Fi-1 + Fi-2 ∀ i ≥
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