萌新70求助,不知道哪里错了
查看原帖
萌新70求助,不知道哪里错了
580992
Bloo楼主2021/11/12 08:39
import java.util.Scanner;

public class p7621 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double y = 0.0;
        for (int i = 0; i < n; i++) {
            double x = sc.nextDouble();
            int l = sc.nextInt();
            y += x*l;
        }
        y = y*0.85;
        System.out.printf("%.1f",y);
    }
}

萌新求助,实在是不知道哪里错了

2021/11/12 08:39
加载中...