public class test { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String line = reader.readLine(); if (line == null) { System.out.println("Input error."); System.exit(-1); }
int year = Integer.parseInt(line); if ( (year % 4 == 0 && year % 100 != 0) || year % 400 == 0) System.out.println("閏年"); else System.out.println("平年"); } }