計ニンニク客-泥塑客
2576 ワード
//自逆ネズミ
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
//while(true) , , break
while(true){
int n = scan.nextInt();
scan.nextLine();
if(n==-1) {
break;
}
Stu[] stu = new Stu[n];
int max = Integer.MIN_VALUE;
int min = Integer.MAX_VALUE;
int k1=0,k2=0;
for(int i=0;inew Stu(scan.nextInt(),scan.nextInt
(),scan.nextInt(),scan.next());
if(stu[i].area>max){
max=stu[i].area;
k1=i;
}
if(stu[i].areaout.println(stu[k1].name+" took clay from "+stu[k2].name+".");
}
}
}
class Stu{
int length;
int width;
int height;
int area;
String name;
Stu(int l,int w,int h,String name){
this.length=l;
this.height=h;
this.width=w;
this.name=name;
this.area=l*h*w;
}
}