#10924: [JAVA]請問這題怎麼錯


stu401302006 (yu)

學校 : 國立虎尾科技大學
編號 : 57796
來源 : [140.130.36.49]
最後登入時間 :
2017-10-22 00:13:12
a005. Eva 的回家作業 -- POJ | From: [1.165.34.49] | 發表日期 : 2016-05-13 12:05

import java.util.*;
public class NAME{
public static void main(String[] args) {
Scanner Keyboard = new Scanner(System.in);
int a,b,c,d ;
int x=0,y=0;
while(Keyboard.hasNext()){
a = Keyboard.nextInt();
b = Keyboard.nextInt();
c = Keyboard.nextInt();
d = Keyboard.nextInt();
if(d%c==0)
System.out.println(a+" "+b+" "+c+" "+d+" "+(d*d/c));
else
System.out.println(a+" "+b+" "+c+" "+d+" "+(d+d-c));
}
}
}

 
ZeroJudge Forum