用CMD測試都可以
為什麼丟上來就不行呢
請大大指點一下
import java.util.Scanner;
class A005{
public static void main (String[]args){
Scanner input=new Scanner(System.in);
while(input.hasNext()){
int a = input.nextInt();
int b = input.nextInt();
int c = input.nextInt();
int d = input.nextInt();
int e;
if(b-a==c-b){
int i= b-a;
e=d+i;
System.out.printf("%d %d %d %d %d\n",a,b,c,d,e);
}else if((b/a)==(c/b)){
int j =b/a;
e=d*j;
System.out.printf("%d %d %d %d %d\n",a,b,c,d,e);
}
}
}
}