結果

問題 No.779 Heisei
ユーザー Grenache
提出日時 2019-04-26 15:35:58
言語 Java
(openjdk 23)
結果
AC  
実行時間 138 ms / 1,000 ms
コード長 1,022 bytes
コンパイル時間 5,878 ms
コンパイル使用メモリ 77,824 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2024-11-06 05:45:29
合計ジャッジ時間 9,167 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.Scanner;


public class Main_yukicoder779 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int y = sc.nextInt();
		int m = sc.nextInt();
		int d = sc.nextInt();

		if (y > 1989 && y < 2019) {
			pr.println("Yes");
		} else if (y == 1989) {
			if (m > 1) {
				pr.println("Yes");
			} else {
				if (d >= 8) {
					pr.println("Yes");
				} else {
					pr.println("No");
				}
			}
		} else if (y == 2019) {
			if (m < 4) {
				pr.println("Yes");
			} else if (m == 4) {
				if (d <= 30) {
					pr.println("Yes");
				} else {
					pr.println("No");
				}
			} else {
				pr.println("No");
			}
		} else {
			pr.println("No");
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0