import java.io.*;
class pro{
double c[][]=new double[6][6];
double y1[][]=new double[6][6];
double y2[][]=new double[6][6];
String[] data=new String[500];
double[] num=new double[6];
int datanumber,s,sx;
int p1,s1,s2,s3,h;
String str;
double dc,dy;
public static void main(String [] args) {
pro test=new pro();
}
pro(){
readfile("data.txt");
for(s=1;s<26;s++){
str=data[s];
String[] x=str.split(">");
for(sx=0;sx<x.length;sx++){
x[sx]=x[sx].replace("<","");
num[sx]=Double.parseDouble(x[sx]);
}
s1=(int)num[0];
s2=(int)num[1];
c[s1][s2]=num[2];
y1[s1][s2]=num[3];
y2[s1][s2]=num[4];
}
for(s1=1;s1<5;s1++){
s2=1;
dc=c[s1+1][s2]-c[s1][s2];
dy=y1[s1+1][s2]-y1[s1][s2];
System.out.println(1-dc/dy);
}
s1=3;
for(s2=1;s2<6;s2++){
System.out.println(y1[s1][s2]);
}
s2=3;
for(s1=1;s1<6;s1++){
System.out.println(y2[s1][s2]);
}
}
void readfile(String file){
String str;
BufferedReader br;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"SJIS"));
while((str = br.readLine()) != null) {
s=s+1;
data[s]=str;
}
br.close();
} catch (IOException e) {System.out.println(e);}
datanumber=s;
}
}
最終更新:2011年07月21日 14:50