用 String.format("%.2f", d); 来四舍五入 public class Main { public static void main(String[] args) throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String n = in.readLine(); String[] s = n.split("[;,]"); for (...