题解 | #取近似值#
取近似值
https://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
import java.util.Scanner fun main(args: Array<String>) { val read = Scanner(System.`in`) val ans = read.nextFloat() val de = ans.toInt() println(if (ans - de>=0.5) "${de+1}" else "$de ") }