提示:该题用文件读写:freopen("pencil.in","r",stdin); freopen("pencil.out","w",stdout); 否则,源代码将通不过。 ---------------------