Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
java runtime error的话,语言的要注入输入的问题,提供一个网友写的输入类一直runtime,StringTokenizer和Scanner都试过了,还是不行 用这个替换之后,AC了 static class sc{ static BufferedReader reader; static StringTokenizer tokenizer; static void init(InputStream input){ reader=new BufferedReader(new InputStreamReader(input)); tokenizer=new StringTokenizer(""); } static String next() throws IOException{ while(!tokenizer.hasMoreTokens()){ tokenizer=new StringTokenizer(reader.readLine()); } return tokenizer.nextToken(); } static int nextInt() throws IOException{ return Integer.parseInt(next()); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator