Jenny and Magic Book
CodeChefOpen on judge ↗
Little Jenny got a magic book on her Birthday. Magic book is not like a normal book it has the following properties: - It contains infinite number of pages. Each page has one unique page_number. - Magic book contains only pages whose page number is combination of 1,3 and 5. (1, 3, 5, 11, 13, 15, 31, 33, 35, 51, 53, 55, 111...). Now his friend jack gives her a task to count the number of pages
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