Timer is Running

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.

abnandi04 | 801 |

KshamaGupta | 412 |

srivastavad270 | 223 |

bhavyapratap56 | 206 |

anshusingh20112001 | 181 |

abnandi04 | 776 |

KshamaGupta | 296 |

srivastavad270 | 223 |

bhavyapratap56 | 206 |

afreensartaj131 | 170 |

blackshadows | 5362 |

Ibrahim Nash | 5244 |

akhayrutdinov | 5111 |

mb1973 | 4976 |

Quandray | 4748 |

Login to report an issue on this page.