Submission #217481

#TimeUsernameProblemLanguageResultExecution timeMemory
217481berryzed시간과 날짜 (KRIII5P_1)Java
Compilation error
0 ms0 KiB
public class td { private static final int[] LAST_DAY = {-1, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int T = Integer.parseInt(br.readLine()); int[][] xy = new int[T][2]; for (int i = 0; i < T; i++) { StringTokenizer st = new StringTokenizer(br.readLine()); xy[i][0] = Integer.parseInt(st.nextToken()); xy[i][1] = Integer.parseInt(st.nextToken()); } // 시간 날짜 for (int[] datetime : xy) { System.out.println(checkTime(datetime) + " " + checkDate(datetime)); } } private static String checkDate(int[] date) { if (date[0] >= 1 && date[0] <= 12 && date[1] >= 1 && date[1] <= LAST_DAY[date[0]]) return "Yes"; return "No"; } private static String checkTime(int[] time) { if (time[0] >= 0 && time[0] <= 23 && time[1] >= 0 && time[1] <= 59) return "Yes"; return "No"; } }

Compilation message (stderr)

td.java:5: error: cannot find symbol
	public static void main(String[] args) throws IOException {
	                                              ^
  symbol:   class IOException
  location: class td
td.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class td
td.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class td
td.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class td
td.java:11: error: cannot find symbol
			StringTokenizer st = new StringTokenizer(br.readLine());
			^
  symbol:   class StringTokenizer
  location: class td
td.java:11: error: cannot find symbol
			StringTokenizer st = new StringTokenizer(br.readLine());
			                         ^
  symbol:   class StringTokenizer
  location: class td
6 errors