mport java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int year = sc.nextInt();
if(year % 4 == 0){
if(year % 400 == 0){
System.out.print("1");
}else if(year % 100 == 0){
System.out.print("0");
}else{
System.out.print("1");
}
}else{
System.out.print("0");
}
}
}
'코드테스트' 카테고리의 다른 글
[프로그래머스] 정수의 제곱근 판별 (0) | 2022.09.18 |
---|---|
[백준] 2558번 곱셉 풀이 (0) | 2021.10.05 |
[백준] 문제 - 개 (0) | 2021.10.04 |