第 1 測資點(100%): WA (line:4)
答案不正確
您的答案為: 1 1 1 1 1 正確答案為: 2 4 6 8 10
哪位大神能幫幫我!!
import java.util.Scanner;
public class a005 {
public static void main(String[] args) {
int a1,a2,a3,a4,t,i;
Scanner cin = new Scanner(System.in);
t = cin.nextInt();
for(i=0;i<t;i++){
a1 = cin.nextInt();
a2 = cin.nextInt();
a3 = cin.nextInt();
a4 = cin.nextInt();
if (a3-a2==a4-a3)
System.out.println(a1+" "+a2+" "+a3+" "+a4+" "+(a4+a3-a2));
if (a3/a2==a4/a3 && a3%a2==0)
System.out.println(a1+" "+a2+" "+a3+" "+a4+" "+a4*a3/a2);
}
}
}