BETA

Difficulty Level: Easy

Submissions: 679 Accuracy:

40.35%

Get Minimum Squares
     

Given a number N. You need to write a program to print the minimum number of squares of this number that sums to N. For Example: If N = 100 , N can be expressed as (10*10) and also as (5*5 + 5*5 + 5*5 + 5*5) but the output will be 1 as minimum number of square is 1 , i.e (10*10).

Input:
First line of input contains a single integer T, which denotes the number of test cases. Then T test cases follows. First line of each test case contains a single integer N.
Output:
For each test case print the minimum number of squares that sums to N.

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

Example:
Input:

3
100
6
25
Output:
1
3
1

 

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

Contributor: Harsh Agarwal

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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