The Dinner Request
CodeChefOpen on judge ↗
Alice is irritating Bob to take her out for dinner. But, Bob is not interested as he has solve this problem given by his boss, Mr. Network. The problem is as follows: Let F(N) denote the number of factors of N, including 1 and N. Given a number N, Bob needs to find out if the value F(N) = 2 or not. If Alice can solve the problem, then Bob will take her to dinner. Alice needs your help, help her!
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