题解 | #KiKi算期末成绩#
KiKi算期末成绩
https://www.nowcoder.com/practice/4ef07b4f80fc4027a4b90e2245f8f637
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String str = in.nextLine(); String []num = str.split(" "); double sum = Double.parseDouble(num[0])*0.2+ Double.parseDouble(num[1])*0.1+ Double.parseDouble(num[2])*0.2+ Double.parseDouble(num[3])*0.5; System.out.printf("%.1f",sum); } }