@@ -0,0 +1,671 @@
+import java.util.Scanner;%0A%0Apublic class Main %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        Scanner sc = new Scanner(System.in);%0A%0A        int n = sc.nextInt();%0A%0A        for (int i = 0; i %3C n; i++) %7B%0A%0A            int bathPrice = sc.nextInt();%0A            int poolPrice = sc.nextInt();%0A            int numBath = sc.nextInt();%0A            int numPool = sc.nextInt();%0A%0A            int regularPrice = (bathPrice * numBath) + (poolPrice * numPool);%0A            int discountedPrice = (int) ((bathPrice * (Math.max(numBath, 5)) + (poolPrice * Math.max(numPool, 2))) * 0.8);%0A%0A            System.out.println(Math.min(regularPrice, discountedPrice));%0A%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

Create : 0278