結果

問題 No.779 Heisei
ユーザー takeya_okinotakeya_okino
提出日時 2019-09-28 17:45:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 175 ms / 1,000 ms
コード長 519 bytes
コンパイル時間 2,969 ms
コンパイル使用メモリ 76,828 KB
実行使用メモリ 55,300 KB
最終ジャッジ日時 2024-04-10 11:29:27
合計ジャッジ時間 7,184 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 172 ms
54,764 KB
testcase_01 AC 167 ms
55,016 KB
testcase_02 AC 168 ms
54,996 KB
testcase_03 AC 167 ms
55,200 KB
testcase_04 AC 166 ms
55,076 KB
testcase_05 AC 166 ms
55,148 KB
testcase_06 AC 166 ms
55,056 KB
testcase_07 AC 168 ms
55,296 KB
testcase_08 AC 168 ms
54,756 KB
testcase_09 AC 166 ms
55,036 KB
testcase_10 AC 169 ms
55,300 KB
testcase_11 AC 169 ms
54,820 KB
testcase_12 AC 170 ms
55,028 KB
testcase_13 AC 173 ms
54,996 KB
testcase_14 AC 169 ms
55,044 KB
testcase_15 AC 173 ms
55,248 KB
testcase_16 AC 175 ms
54,960 KB
testcase_17 AC 165 ms
54,976 KB
testcase_18 AC 167 ms
54,984 KB
testcase_19 AC 167 ms
55,272 KB
testcase_20 AC 164 ms
55,048 KB
testcase_21 AC 170 ms
55,204 KB
testcase_22 AC 168 ms
55,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int y = sc.nextInt();
    int m = sc.nextInt();
    int d = sc.nextInt();
    String s = "" + y;
    if(m < 10) {
      s += ("0" + m);
    } else {
      s += m;
    }
    if(d < 10) {
      s += ("0" + d);
    } else {
      s += d;
    }
    int sd = Integer.parseInt(s);
    String ans = "No";
    if((sd >= 19890108) && (sd <= 20190430)) ans = "Yes";
    System.out.println(ans);
  }
}
0