アットウィキロゴ

p082603

package memo;
 
 
public class pro {
 
 
    int sx,number;
int[] year=new int[500];
String[] v=new String[500];
int[] month=new int[500];
double[] delta=new double[500];
 
double[] com=new double[500];
String[] code=new String[500];
String[] im=new String[500];
String[] ex=new String[500];
int[] rank=new int[500];
    String[] name=new String[500];
 
 
public static void main(String[] args) {
        pro t=new pro();
    }
    pro(){
 
        String db,tab;
 
        db="sv";
        tab="sv";
        String b1;
       int s;
 
 
 
 
        select sub=new select();
        sub.makedata(db,tab,"b3","c2");
        number=sub.number;
        ex=sub.v;
        year=sub.year;
    month=sub.month;
 
        ranking();
 
    for(s=1;s<number+1;s++){   
    sx=rank[number+1-s];
  System.out.println(year[sx]+"年"+month[sx]+"月,"+num(ex[sx])/(100));     
    }
 
 
 
 
 
 
    }
 
 
 
 
 
       void ranking(){ 
int r,s,sx,h; 
int[] ch=new int[2001];
double maxu;
 int[] y=new int[500];
for(s=1;s<number+1;s++){ 
y[s]=13*year[s]+month[s];
}
 
for(r=1;r<number+1;r++){ 
sx=0; 
maxu=-999999; 
for(s=1;s<number+1;s++){ 
h=0; 
if(y[s]>maxu)h=h+1; 
if(ch[s]<50)h=h+1; 
if(h==2)maxu=y[s]; 
if(h==2)sx=s; 
}
rank[r]=sx; 
ch[sx]=100; 
}
 
 
}
 
 
 
 
     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;
 
 
 
}
 
 
 
}
 
最終更新:2015年09月20日 03:03