import java.math.MathContext import java.math.RoundingMode fun main() { val t = readLine()!!.toInt() repeat(t) { val t = readLine()!!.toBigDecimal() val sqrt = t.sqrt(MathContext.DECIMAL128) val result = sqrt.setScale(0, RoundingMode.FLOOR).toBigInteger() println(result) } }