Masala #XRBBGC5KRX
Challenge Fun #10: Integer Square Root
For each given a number N, the integer S is called integer square root
of N if S x S <= N
and (S+1) x (S+1) > N
.
In other words, S = Math.floor(Math.sqrt(N))
Your task is to calculate the integer square root
of a given Number
.
Note: Input is given in string format. That is, the Number
may be very very large ;-)
[input]
stringNumber
number in decimal form. 0 < Number < 10^100
[output]
a string
integer squareroot of Number
.
# | input.txt | output.txt |
---|---|---|
1 |
1 |
1 |
2 |
5 |
2 |
3 |
100 |
10 |