package hage;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[60000];
String[] code=new String[60000];
String[] pref=new String[60000];
double[] v=new double[60000];
int[] year=new int[6000];
String[] credit=new String[60000];
String[] dic=new String[60000];
String[] ken=new String[60000];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
int tr;
for(tr=1;tr<297;tr++){
readfile sub=new readfile();
sub.makedata("io/"+tr+".txt","UTF-8");
data=sub.data;
datanumber=sub.datanumber;
for(s=1;s<datanumber+1;s++){
catchword sub2=new catchword();
code[s]= sub2.makedata(data[s],"code_bus");
pref[s]= sub2.makedata(data[s],"pref");
credit[s]= sub2.makedata(data[s],"credit");
String str=sub2.makedata(data[s],"year");
year[s]=numx(str);
str=sub2.makedata(data[s],"value");
v[s]=num(str);
}
int h,sx,dicnumber=0;
for(s=1;s<datanumber+1;s++){
h=0;
for(sx=1;sx<dicnumber+1;sx++){
if(pref[s].equals(dic[sx]))h=100;
}
if(h<50)dicnumber=dicnumber+1;
if(h<50)dic[dicnumber]=pref[s];
}
for(s=1;s<datanumber+1;s++){
h=0;
for(sx=1;sx<dicnumber+1;sx++){
if(pref[s].equals(dic[sx]))ken[s]="p"+sx;
}
}
for(s=1;s<datanumber+1;s++){
if(credit[s].indexOf("③")>-1)System.out.println(year[s]+","+ken[s]+","+code[s]+","+v[s]);
}
}
}
int numx(String str){
int nx;
nx=0;
try{
nx=Integer.parseInt(str);
}catch (Exception e) {}
return nx;
}
double num(String str){
double nx;
nx=0;
try{
nx=Double.parseDouble(str);
}catch (Exception e) {}
return nx;
}
}
最終更新:2016年05月17日 21:24