package mono;
public class pro {
String[] code=new String[50];
String[] name=new String[50];
public static void main(String[] args) {
pro test=new pro();
}
pro(){
name[1]="総貨物";
name[2]="穀物";
name[3]="野菜果物";
name[4]="その他の農産品";
name[5]="畜産品";
name[6]="水産品";
name[7]="木材";
name[8]="薪炭";
name[9]="石炭";
name[10]="金属鉱";
name[11]="砂利砂石材";
name[12]="石灰石";
name[13]="その他の非金属鉱";
name[14]="鉄鋼";
name[15]="非鉄金属";
name[16]="金属製品";
name[17]="機械";
name[18]="セメント";
name[19]="その他の窯業品";
name[20]="石油製品";
name[21]="石炭製品";
name[22]="化学薬品";
name[23]="化学肥料";
name[24]="その他の化学工業品";
name[25]="紙パルプ";
name[26]="繊維工業品";
name[27]="食料工業品";
name[28]="日用品";
name[29]="その他の製造工業品";
name[30]="金属くず";
name[31]="動植物性飼肥料";
name[32]="その他の特種品";
name[33]="その他";
name[34]="廃棄物";
name[35]="甲種鉄道車両";
name[36]="コンテナ";
code[1]="0-0";
code[2]="1-1";
code[3]="1-2";
code[4]="1-3";
code[5]="1-4";
code[6]="1-5";
code[7]="2-6";
code[8]="2-7";
code[9]="3-8";
code[10]="3-9";
code[11]="3-10";
code[12]="3-11";
code[13]="3-12";
code[14]="4-13";
code[15]="4-14";
code[16]="4-15";
code[17]="4-16";
code[18]="5-17";
code[19]="5-18";
code[20]="5-19";
code[21]="5-20";
code[22]="5-21";
code[23]="5-22";
code[24]="5-23";
code[25]="6-24";
code[26]="6-25";
code[27]="6-26";
code[28]="7-27";
code[29]="7-28";
code[30]="8-29";
code[31]="8-30";
code[32]="8-31";
code[33]="9-32";
code[34]="10-31";
code[35]="10-32-1";
code[36]="10-32-2";
String str="セメント";
str=rev(str);
int n=point(str);
System.out.println(name[n]);
}
String rev(String str){
String str1=str.replace("\n","");
str1=str1.replace(" ","");
str1=str1.replace(" ","");
str1=str1.replace(",","");
return str1;
}
int point(String strx){
int n=0;
if(strx==null)strx="";
String str=rev(strx);
if(str.indexOf("総貨物")>-1)n=1;
if(str.indexOf("穀")>-1)n=2;
if(str.indexOf("野菜")>-1)n=3;
int h;
h=0;
if(str.indexOf("他")>-1)h=h+1;
if(str.indexOf("農")>-1)h=h+1;
if(h==2)n=4;
if(str.indexOf("畜")>-1)n=5;
if(str.indexOf("水産")>-1)n=6;
if(str.indexOf("木材")>-1)n=7;
if(str.indexOf("薪")>-1)n=8;
if(str.indexOf("砂")>-1)n=11;
h=0;
if(str.indexOf("他")>-1)h=h+1;
if(str.indexOf("非金属鉱")>-1)h=h+1;
if(h==2)n=13;
h=0;
if(str.indexOf("金属鉱")>-1)h=h+1;
if(n==0)h=h+1;
if(h==2)n=10;
if(str.indexOf("鉄鋼")>-1)n=14;
if(str.indexOf("非鉄")>-1)n=15;
h=0;
if(str.indexOf("金属")>-1)h=h+1;
if(str.indexOf("製")>-1)h=h+1;
if(h==2)n=16;
if(str.indexOf("機械")>-1)n=17;
if(str.indexOf("セメ")>-1)n=18;
h=0;
if(str.indexOf("他")>-1)h=h+1;
if(str.indexOf("窯")>-1)h=h+1;
if(h==2)n=19;
h=0;
if(str.indexOf("石油")>-1)h=h+1;
if(str.indexOf("製")>-1)h=h+1;
if(h==2)n=20;
h=0;
if(str.indexOf("石炭")>-1)h=h+1;
if(str.indexOf("製")>-1)h=h+1;
if(h==2)n=21;
h=0;
if(str.indexOf("石炭")>-1)h=h+1;
if(n==0)h=h+1;
if(h==2)n=9;
if(str.indexOf("薬品")>-1)n=22;
h=0;
if(str.indexOf("肥料")>-1)h=h+1;
if(str.indexOf("化学")>-1)h=h+1;
if(h==2)n=23;
h=0;
if(str.indexOf("他")>-1)h=h+1;
if(str.indexOf("化学")>-1)h=h+1;
if(h==2)n=24;
if(str.indexOf("紙")>-1)n=25;
if(str.indexOf("パルプ")>-1)n=25;
if(str.indexOf("繊維")>-1)n=26;
if(str.indexOf("食料")>-1)n=27;
if(str.indexOf("日用")>-1)n=28;
h=0;
if(str.indexOf("他")>-1)h=h+1;
if(str.indexOf("工業")>-1)h=h+1;
if(h==2)n=29;
h=0;
if(str.indexOf("金")>-1)h=h+1;
if(str.indexOf("くず")>-1)h=h+1;
if(h==2)n=30;
if(str.indexOf("動植物性")>-1)n=31;
if(str.indexOf("特種")>-1)n=32;
if(str.indexOf("廃棄物")>-1)n=34;
if(str.indexOf("車両")>-1)n=35;
if(str.indexOf("コンテナ")>-1)n=36;
h=0;
if(str.indexOf("計")==0)h=h+1;
if(n==0)h=h+1;
if(h==2)n=1;
if(n==0)n=33;
return n;
}
}
最終更新:2015年09月13日 21:29