結果
問題 | No.780 オフ会 |
ユーザー | chikeplus |
提出日時 | 2019-01-23 13:06:15 |
言語 | F# (.NET 7) |
結果 |
WA
|
実行時間 | - |
コード長 | 420 bytes |
コンパイル時間 | 3,736 ms |
コンパイル使用メモリ | 161,152 KB |
実行使用メモリ | 27,204 KB |
最終ジャッジ日時 | 2023-10-14 09:22:14 |
合計ジャッジ時間 | 7,106 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 87 ms
23,000 KB |
testcase_01 | AC | 87 ms
23,068 KB |
testcase_02 | AC | 88 ms
23,072 KB |
testcase_03 | AC | 89 ms
25,116 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 87 ms
22,896 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 87 ms
22,976 KB |
testcase_10 | AC | 87 ms
22,964 KB |
testcase_11 | WA | - |
testcase_12 | AC | 88 ms
24,940 KB |
testcase_13 | AC | 90 ms
22,968 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 88 ms
22,936 KB |
testcase_17 | AC | 88 ms
20,912 KB |
testcase_18 | WA | - |
testcase_19 | AC | 88 ms
20,920 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. /home/judge/data/code/Main.fs(6,13): warning FS0025: Incomplete pattern matches on this expression. For example, the value '(1,1)' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value.
ソースコード
let args2 = [ 3;4 ] 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,_ -> 0 | _,0 -> 0 let res = matchPair (Seq.head args) (Seq.item 1 args) printfn "%s" (if res = 0 then "YES" else "NO") printfn "%i" res