結果

問題 No.779 Heisei
ユーザー chikeplus
提出日時 2019-01-24 13:13:08
言語 F#
(F# 4.0)
結果
AC  
実行時間 71 ms / 1,000 ms
コード長 564 bytes
コンパイル時間 12,407 ms
コンパイル使用メモリ 193,556 KB
実行使用メモリ 30,720 KB
最終ジャッジ日時 2024-11-06 02:41:14
合計ジャッジ時間 15,034 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (435 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let inputs = System.Console.ReadLine().Split(' ')
let args = [for str in inputs do yield int(str) ]

let checkDate(y , m , d)= 
    match ( y , m , d) with
    | y , _ , _ when ( 1990 <= y ) && ( y <= 2018 ) -> printfn "Yes"
    | y , m , d when ( 1989 = y ) && ( m > 1 )      -> printfn "Yes"
    | y , m , d when ( 1989 = y ) && ( m = 1 ) && (d >= 8) -> printfn "Yes"
    | y , m , d when ( 2019 = y ) && ( m <=4 ) -> printfn "Yes" 
    | _ , _ , _ -> printfn "No"

let ( y , m , d ) = ( List.head args, List.item 1 args, List.item 2 args)
checkDate ( y , m , d)
0