윤년1 [백준 2753번 - java] 윤년 https://www.acmicpc.net/problem/2753 내 답안 import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { Scanner s = new Scanner(System.in); int year = s.nextInt(); if ((year%4 == 0) && ((year%100 != 0) || (year%400 == 0))) { System.out.println("1"); } else System.out.println("0"); } } 또 다른 풀이 방법들 - 이중 if문 사용 - A.compareTo(B) 사용 (A가 B 보다 크면 .. 2021. 11. 3. 이전 1 다음