← All problemsSign in

Chef and Chocolates II

A room has N boxes arranged like an array numbered from 1 to N. All the boxes are empty except the first two boxes(1st & 2nd) which contains 1 chocolate. You have to fill other boxes with Chocolates such that ith box contains number of chocolates in (i-1)th box + (i-2)th box. How many chocolates are there in the Nth box?. Input The first line contains T,the number of test cases. Each of next T l

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start