アットウィキロゴ

JUMANJU

import java.io.*;

class pro{

int datanumber,authornumber;
String[] data=new String[50000];
String[] word=new String[50000];
String[] p=new String[50000];
String str;
int strlong,s,sx;
int h;

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

pro(){

readfile("130.txt");

sx=0;
for(s=1;s<datanumber+1;s++){

str=data[s];

String[] x=str.split(" ");

strlong=x.length;

h=0;
if(strlong>2)h=h+1;
if(x[0].equals("@"))h=0;
if(h==1)sx=sx+1;
if(h==1)word[sx]=x[0];
if(h==1)p[sx]=x[3];
}


for(s=1;s<sx+1;s++){
System.out.println(p[s]);
}



}

void readfile(String file){

String str;
BufferedReader br;
int s;
s=0;

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

}



}
最終更新:2011年06月06日 20:22