
[풀이]
import java.util.*;
public class Test{
public static void main(String[] args){
int result = 0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
if(n % 4 == 0){
if(n % 100 != 0 || n % 400 == 0){
result = 1;
}
}
System.out.println(result);
}
}'알고리즘 > 백준' 카테고리의 다른 글
| [백준] 3052번 / 나머지 (0) | 2025.08.07 |
|---|---|
| [백준] 10807번 / 개수 세기 (0) | 2025.08.05 |
| [백준] 1330번 / 두 수 비교하기 (0) | 2025.08.05 |
| [백준] 1001번 / A-B (0) | 2025.08.05 |
| [백준] 1546번 / 평균 구하기 (0) | 2025.07.29 |