結果

問題 No.998 Four Integers
ユーザー ikdikd
提出日時 2020-05-01 18:21:15
言語 F#
(F# 4.0)
結果
AC  
実行時間 75 ms / 1,000 ms
コード長 444 bytes
コンパイル時間 4,939 ms
コンパイル使用メモリ 159,692 KB
実行使用メモリ 24,724 KB
最終ジャッジ日時 2023-08-26 00:48:07
合計ジャッジ時間 8,619 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
22,640 KB
testcase_01 AC 74 ms
20,664 KB
testcase_02 AC 73 ms
22,632 KB
testcase_03 AC 74 ms
24,544 KB
testcase_04 AC 74 ms
22,716 KB
testcase_05 AC 74 ms
20,608 KB
testcase_06 AC 75 ms
22,656 KB
testcase_07 AC 74 ms
20,560 KB
testcase_08 AC 74 ms
24,612 KB
testcase_09 AC 74 ms
22,628 KB
testcase_10 AC 73 ms
24,608 KB
testcase_11 AC 74 ms
22,728 KB
testcase_12 AC 73 ms
22,624 KB
testcase_13 AC 74 ms
24,676 KB
testcase_14 AC 74 ms
24,696 KB
testcase_15 AC 74 ms
24,724 KB
testcase_16 AC 73 ms
22,536 KB
testcase_17 AC 75 ms
20,620 KB
testcase_18 AC 74 ms
22,612 KB
testcase_19 AC 73 ms
24,720 KB
testcase_20 AC 75 ms
24,488 KB
testcase_21 AC 75 ms
22,544 KB
testcase_22 AC 74 ms
22,652 KB
testcase_23 AC 73 ms
22,616 KB
testcase_24 AC 74 ms
22,468 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

/home/judge/data/code/Main.fs(8,9): warning FS0025: Incomplete pattern matches on this expression. For example, the value '[|_; _; _; _; _|]' may indicate a case not covered by the pattern(s).

ソースコード

diff #

// 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
0