結果

問題 No.779 Heisei
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-02-06 19:36:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 1,000 ms
コード長 604 bytes
コンパイル時間 2,228 ms
コンパイル使用メモリ 74,384 KB
実行使用メモリ 54,220 KB
最終ジャッジ日時 2024-04-23 22:47:20
合計ジャッジ時間 5,403 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
52,888 KB
testcase_01 AC 115 ms
53,808 KB
testcase_02 AC 104 ms
52,816 KB
testcase_03 AC 99 ms
52,384 KB
testcase_04 AC 103 ms
53,024 KB
testcase_05 AC 100 ms
53,040 KB
testcase_06 AC 116 ms
53,988 KB
testcase_07 AC 102 ms
52,904 KB
testcase_08 AC 102 ms
54,140 KB
testcase_09 AC 106 ms
52,932 KB
testcase_10 AC 105 ms
53,124 KB
testcase_11 AC 113 ms
53,856 KB
testcase_12 AC 114 ms
54,220 KB
testcase_13 AC 115 ms
54,208 KB
testcase_14 AC 105 ms
52,672 KB
testcase_15 AC 109 ms
52,852 KB
testcase_16 AC 109 ms
53,732 KB
testcase_17 AC 110 ms
53,492 KB
testcase_18 AC 109 ms
53,040 KB
testcase_19 AC 108 ms
53,260 KB
testcase_20 AC 105 ms
52,964 KB
testcase_21 AC 100 ms
52,992 KB
testcase_22 AC 102 ms
52,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.time.LocalDate;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        LocalDate from = LocalDate.of(1989, 1, 8);
        LocalDate to = LocalDate.of(2019, 4, 30);
        
        Scanner stdin = new Scanner(System.in);
        int y = stdin.nextInt();
        int m = stdin.nextInt();
        int d = stdin.nextInt();
        LocalDate date = LocalDate.of(y, m, d);
        
        String answer = (from.isEqual(date) || from.isBefore(date)) && (to.isEqual(date) || to.isAfter(date)) ? "Yes" : "No";
        System.out.println(answer);
    }
}
0