結果
問題 | No.780 オフ会 |
ユーザー | chikeplus |
提出日時 | 2019-01-24 12:40:27 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 354 bytes |
コンパイル時間 | 3,258 ms |
コンパイル使用メモリ | 163,248 KB |
実行使用メモリ | 25,140 KB |
最終ジャッジ日時 | 2023-10-14 09:37:16 |
合計ジャッジ時間 | 6,312 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 85 ms
23,064 KB |
testcase_01 | AC | 84 ms
23,092 KB |
testcase_02 | AC | 84 ms
21,036 KB |
testcase_03 | AC | 84 ms
23,004 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 85 ms
23,084 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 85 ms
23,100 KB |
testcase_10 | AC | 84 ms
23,004 KB |
testcase_11 | WA | - |
testcase_12 | AC | 84 ms
23,124 KB |
testcase_13 | AC | 86 ms
23,036 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 86 ms
23,092 KB |
testcase_17 | AC | 84 ms
22,988 KB |
testcase_18 | WA | - |
testcase_19 | AC | 84 ms
21,028 KB |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved.
ソースコード
let inputs = System.Console.ReadLine().Split(' ') let args = seq{ for str in inputs do yield int(str) } let matchPair a b = match a,b with | a,b when (a + 1) <= b -> 0 | a,b when (a + 1) > b -> (a + 1) - b | _,_ -> 0 let res = matchPair (Seq.head args) (Seq.item 1 args) printfn "%s" (if res = 0 then "YES" else "NO") printfn "%i" res