Problems
5. SquareRoot
Integer Square RootsFind the integer part of square root of a given number N (the greatest integer not greater the positive square root of N).
Input Format:
Line 1 : A single integer T, the number of testcases.
Lines 2 to T+1 : The i+1th line contains a single integer N_i.
Output Format:
Contains T lines.
ith line contains integer part of the square root of N_i.
Constraints:
1 <= T <= 1000
N_i fits in a 64-bit signed integer(long long).
Points:
400
Scoring:
Absolute Score = 1000000 / ( 5*S + 2*C + 15*K + 3*O + 1000000*D + 1000000*A )
where,
S = Number of semicolons ;
C = Number of non-whitespace characters
K = Number of keywords
O = Number of commas ,
D = Number of multiply or divide symbols * /
A = Number of occourances of the string "<<" or ">>" (without quotes)
Allowed Header Files:
stdio.h
Sample Input:
2
15
17
Sample Output
3
4