F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_33257890_23967\Main.java:1: 错误: 解析时已到达文件结尾
import java.util.Scanner; public class Nyoj14 { public static void main(String[] args) {	Scanner cin = new Scanner(System.in);		int n;int k = 0;		while(cin.hasNext())		{			char map[][]= new char[100][100];			n =cin.nextInt();			char out =cin.next().charAt(0);			char in = cin.next().charAt(0);			char last;						if(k!=0)				System.out.println();			k++;			int w= 0,m = n;			int lay = (n+1)/2%2;			if(lay==0)				last =in;			else last =out;			while(m-w!=-1)			{			for(int i = w;i <m;i++)			{				for(int j = w;j <m;j++)				{					  if((i==0&&j==0)||(i==n-1&&j==n-1)||(i==0&&j==n-1)||(i==n-1&&j==0))  			              map[i][j]=' ';  			              else  			              map[i][j]=last;				}			}			if(last==out)  	              last=in;//交换覆盖;   	           else  	              last=out;  	            w++;  	            m--;  	        } 			if(n==1)				System.out.println(out);			else 			{				for(int  ss = 0 ;  ss <n;ss++)				{					for(int tt= 0; tt<n;tt++)					{						System.out.print(map[ss][tt]);					}					System.out.println();				}			}		}	}}
                                                                                        	                                     		                		                    		 			                                 			                 			                               			                               			          						        				                     			    			               			                    			          				         			               			              			 			                       			 				                       				 					                                                                      			                              			                    			                             				 			 			               	                      ^
0_0_33257890_23967\Main.java:2: 错误: 解析时已到达文件结尾
 
 ^
2 个错误


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 13:18:15, Gzip enabled