package koku;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[5000];
String[] code=new String[5000];
public static void main(String[] args) {
pro te=new pro();
}
pro(){
readfile sub3=new readfile();
sub3.makedata("data.csv","UTF-8");
data=sub3.data;
datanumber=sub3.datanumber;
int m1=0;
for(s=3;s<datanumber+1;s++){
data[s]=rev_csv(data[s]);
String[] x=data[s].split(",");
int sx;
int n=0;
for(sx=1;sx<48;sx++){
String sp="0"+sx;
if(sx>9)sp=""+sx;
if(x[0].equals(sp))n=sx;
}
if(n>0)m1=n;
code[s]="";
if(n==0)code[s]=m1+x[0];
System.out.println(code[s]);
}
}
String rev_csv(String str){
String str5=str;
int px=str5.indexOf("\"");
while(px>-1){
str5=rev(str5);
px=str5.indexOf("\"");
}
return str5;
}
String rev(String str){
int p1=str.indexOf("\"");
int p2=str.indexOf("\"",p1+1);
String str1=str.substring(0,p1);
String str2=str.substring(p1+1,p2);
String str3=str.substring(p2+1,str.length());
str2=str2.replace(",","");
return str1+str2+str3;
}
}
最終更新:2016年05月21日 03:32