A number k is called a square number if for some value of d > 1, k % (d*d) = 0.

Given a number N, the task is to find the total number of positive square numbers less than or equal to N.

**Input: **

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a sinlge line containing a single integer N.

**Output:**

Corresponding to each test case, print in a new line an integer denoting the total number of positive square numbers less than or equal to N.

**Constraints:**

1<=T<=100

1<=N<=10^9

**Example:**

**Input:**

3

2

4

10

**Output:**

0

1

3

**Explanation:**

4 -> (divisible by 2*2)

8 ->(divisible by 2*2)

9 ->(divisible by 3*3)

For 2-> no numbers less than or equal 2 are square numbers

For 4-> only 4 is a square number

For 10-> 4,8,9 are square numbers

Author: pra1nay7_313

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.

vamsikrishna55 | 162 |

Vagesh Verma | 154 |

UrGuru | 133 |

chaolinyu | 98 |

Akhil varma | 97 |

abducodes | 650 |

harshtyagi36 | 304 |

highway_to_hell | 252 |

Akhil varma | 250 |

arpit_anshuman | 250 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.