← All problemsSign in

AN EASY ONE

A Problem has been bothering Jon Snow for a while. He can hardly focus on his work and is really sad about it. You, being his sister 'Sansa' offered to help him with the problem. the problem is as follow: Given an integer $N$. The following operations can performed on N: 1. If N is $even$: Divide N by $2$. 2. If N is $odd$: Replace N with $3N+1$. You have find that for a given $N$, 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.

voice by Sarvam AI

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

Sign in to start