a005.
Eva 的回家作業
--
POJ
| From: [118.163.125.252] |
發表日期
:
2013-05-27 14:57
在本機跑都可以,但丟上來就一直RE
import java.util.Scanner;
public class a005 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int count = sc.nextInt();
for(int c=0;c<count;c++)
{
Scanner n = new Scanner(System.in);
int i = n.nextInt();
int j = n.nextInt();
int k = n.nextInt();
int l = n.nextInt();
System.out.print(i+" ");
if(j-i==l-k)
{
int a = j-i;
for (int b=1;b<=4;b++)
{
System.out.print(i+a+" ");
i=i+a;
}
}
else if(j/i==l/k)
{
int a = j/i;
for (int b=1;b<=4;b++)
{
System.out.print(i*a+" ");
i=i*a;
}
}
}
}
}