Masala #XRBBGC5KRX

Xotira 32 MB Vaqt 1000 ms
14

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 ;-)


Kiruvchi ma'lumotlar:
  • [input] string Number

number in decimal form. 0 < Number < 10^100


Chiquvchi ma'lumotlar:
  • [output] a string

integer squareroot of Number.


Misollar
# input.txt output.txt
1
1
1
2
5
2
3
100
10