結果

問題 No.779 Heisei
コンテスト
ユーザー Grenache
提出日時 2019-04-26 15:35:58
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 57 ms / 1,000 ms
コード長 1,022 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,720 ms
コンパイル使用メモリ 82,724 KB
実行使用メモリ 46,404 KB
最終ジャッジ日時 2026-05-06 07:47:40
合計ジャッジ時間 6,209 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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