3 Divisors
Submissions: 9847   Accuracy:

29.15%

  Difficulty: Medium   Marks: 4

Given a value N. The task is to find how many numbers less than or equal to N have numbers of divisors exactly equal to 3.

Input:
The first line contains integer T, denoting number of test cases. Then T test cases follow. The only line of each test case contains an integer N.

Output :
For each testcase, in a new line, print the answer of each test case.

Constraints :
1 <= T <= 103
1 <= N <= 1012

Example:
Input :

3
6
10
30

Output :
1
2
3

Explanation:
Testcase 1:
There is only one number 4 which has exactly three divisors 1, 2 and 4.

 

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

Author: Sonesh Shukla


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.