Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class a005 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner input=new Scanner(System.in);
- int a=input.nextInt(),i1,i2,i3,i4;
- for(int i=0;i<a;i++)
- {
- i1=input.nextInt();
- i2=input.nextInt();
- i3=input.nextInt();
- i4=input.nextInt();
- System.out.print(i1+" "+i2+" "+i3+" "+i4+" ");
- if(i2-i1==i4-i3)
- {
- int ans=i4+(i4-i3);
- System.out.println(ans);
- }
- else
- {
- int ans=i4*(i4/i3);
- System.out.println(ans);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement