← All problemsSign in

Bob and Numbers

Bob likes to play with numbers. He just realized that every natural number greater than 1 has a unique prime factorization. He defines the degree of a natural number as the highest power of a prime in its factorization. For example, degree(6) = 1 and degree(8)=3 . He further defines a number as a "bob-prime", if its degree is a prime. He wants to explore the properties of these numbers , so he

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