Square free Integer
CodeChefOpen on judge ↗
In mathematics, a square-free integer is one divisible by no perfect square, except 1. For example, 10 is square-free but 18 is not, as it is divisible by 9. Some square-free numbers are 1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39.... Your job is to calculate Nth square free number. For Example: if N=1 then output is 1 and if N=7 then output is
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