Description
There are n bulbs initially off. For round i, you toggle every ith bulb. After n rounds, how many bulbs are on?
Examples
Input:
n = 3Output:
1Explanation:
Only bulb 1 remains on.
Input:
n = 0Output:
0Explanation:
Edge case returning zero.
Input:
n = 1Output:
1Explanation:
Edge case with minimal input.
Constraints
- •
0 ≤ n ≤ 10⁹