アットウィキロゴ

xkぃ

import java.io.*;

class person{

int s,sx,p1,h;
String data,data1;
int[] cr=new int[10000];
int clong,xlong;
String x1;

public static void main(String [] args) {
        person test=new person();
            }

person(){

readfile("data/5010.txt");

p1=data.indexOf("○");

data1=data.substring(0,p1);


String[] x=data1.split("<BR>");

xlong=x.length;

for(s=0;s<xlong;s++){
clong=x[s].length();
x1=x[s].substring(clong-1,clong);
if(x1.equals("君"))cr[s]=100;
}

for(s=1;s<xlong;s++){
if(cr[s]>50)System.out.println(x[s]);
}



}


void readfile(String file){

String str;
BufferedReader br;  

try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"SJIS"));  
while((str = br.readLine()) != null) {  
data=data+str;  
}
br.close();
} catch (IOException e) {System.out.println(e);}  

}


}
最終更新:2011年06月27日 12:09