← All problemsSign in

Help with string

Rahul ha been given a string containing space separated integers. He does not know how many integers are in the string. He has also been given 2 integers a,b. He has to make a fibonacci type of sequence with it. i.e nth term is sum of (n-1)th term and (n-2)th term. Finally he has to calculate the sum of the nth integer in the above sequence for every integer n in the string. As the output can

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