문제


풀이
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int year = sc.nextInt();
if(year%4 == 0 && (year%100 != 0 || year%400 == 0)){
System.out.print("Leap Year");
} else {
System.out.print("Not Leap Year");
}
}
}'코딩테스트' 카테고리의 다른 글
| [구름LEVEL] Substring (0) | 2021.03.12 |
|---|---|
| [구름LEVEL] 3의 배수 게임 (0) | 2021.03.12 |
| [구름LEVEL] 거스름돈 (2) | 2021.03.12 |
| [구름LEVEL] Bubble sort (0) | 2021.03.12 |