結果

問題 No.779 Heisei
ユーザー kyo1
提出日時 2020-06-23 08:56:46
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 376 bytes
コンパイル時間 3,605 ms
コンパイル使用メモリ 65,024 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-03 19:09:07
合計ジャッジ時間 4,364 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]

ソースコード

diff #

import sequtils, strutils

let read = iterator: string {.closure.} =
  while true:
    for s in stdin.readLine.split: yield s

proc readInt: int = read().parseInt

let Y, M, D = readInt()

if Y > 1989 and Y < 2019:
  echo "Yes"
elif Y == 1989 and ((M == 1 and D >= 8) or M >= 2):
  echo "Yes"
elif Y == 2019 and ((M == 4 and D <= 30) or M < 4):
  echo "Yes"
else:
  echo "No"
0