← All problemsSign in

Weird Fibbo

You are given 2 integers $a$ and $b$ and a function $F$ is defined as: - $F_{0}=a$ - $F_{1}=b$ - $F_{n}=Num(nI(bin(F_{n-2}))+^{*}nD(bin(F_{n-1})))$ for $\forall{n}>1$ Now let's see what these functions $Num, nI, nD, bin$ and operator $+^{*}$ does. - $bin(N)$: Takes an integer $N$ and gives the binary string representing the value of $N$ in binary without leading zeros. For example $bin(5)=101

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