题解 | #字符串分隔#
取近似值
http://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); float num1=sc.nextFloat(); int num2=(int)(num1); if(num1-num2>=0.5){ System.out.println(num2+1); }else{ System.out.println(num2); } } }