이게 왜 안되는지 모르겠다.. 이클립스로 컴파일 했을때는 이상이 없었는데..

 

package baekjoon;

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int year = sc.nextInt();
		if ((year % 400 == 0) && (year % 100 != 0) || (year % 4 == 0)) {
			System.out.println("1");
		} else
			System.out.println("0");
	}
}

'coding > 정올' 카테고리의 다른 글

130 : 반복제어문2 - 형성평가1  (0) 2021.11.20
633 : 반복제어문1 - 자가진단6  (0) 2021.11.19
536 : 반복제어문1 - 자가진단1  (0) 2021.11.19

+ Recent posts