結果
問題 | No.998 Four Integers |
ユーザー |
![]() |
提出日時 | 2020-05-01 18:21:15 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 70 ms / 1,000 ms |
コード長 | 444 bytes |
コンパイル時間 | 18,291 ms |
コンパイル使用メモリ | 203,824 KB |
実行使用メモリ | 30,720 KB |
最終ジャッジ日時 | 2024-12-24 13:15:20 |
合計ジャッジ時間 | 18,408 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (534 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) /home/judge/data/code/Main.fs(8,9): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj] main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
// Learn more about F# at http://fsharp.org open System [<EntryPoint>] let main argv = // https://docs.microsoft.com/ja-jp/dotnet/fsharp/language-reference/pattern-matching#array-pattern let [|a; b; c; d|] = stdin.ReadLine().Split() |> Array.map int |> Array.sortBy(id) if a + 1 = b && b + 1 = c && c + 1 = d then printfn "Yes" else printfn "No" 0 // return an integer exit code