Odd Divisors
Submissions: 1464   Accuracy:

45%

  Difficulty: Basic   Marks: 1

Given a natural number n, print count of numbers from 1 to n that have odd number of divisors.  For example,  4 has odd number of divisors (1, 2, 4), but 8 doesn't (1, 2, 4, 8)

Input:
The first line of input contains an integer T denoting the number of test cases. The first line of each test case is n.

Output:
Count of numbers from 1 to n with odd divisors.

Constraints:
1 <= T <= 100
1 <= N <= 106

Example:
Input:

3
1
4
5

Output:
1
2
2

** For More Input/Output Examples Use 'Expected Output' option **

Author: kartik


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.