我需要在java程序中将10000个字符的字符串作为用户的输入。但是,当我使用正常的方式,它会在ideone和spoj中产生NZEC错误。我怎样才能把这样一个字符串作为输入?如何在java中输入10000字符的字符串输入
import java.io.*;
class st
{
public static void main(String args[])throws IOException
{
String a;
BufferedReader g=new BufferedReader(new InputStreamReader(System.in));
a=g.readLine();
}
}
你准备怎么做? – arshajii
你是什么意思“它给NZEC错误”? –
检查这个问题http://stackoverflow.com/questions/5436207/runtime-error-nzec-in-simple-code – fujy