結果
問題 | No.24 数当てゲーム |
ユーザー | kuuso1 |
提出日時 | 2016-08-19 01:59:06 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 81 ms / 5,000 ms |
コード長 | 714 bytes |
コンパイル時間 | 3,839 ms |
コンパイル使用メモリ | 168,640 KB |
実行使用メモリ | 24,884 KB |
最終ジャッジ日時 | 2023-08-07 15:23:47 |
合計ジャッジ時間 | 5,515 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 80 ms
24,884 KB |
testcase_01 | AC | 79 ms
23,012 KB |
testcase_02 | AC | 79 ms
22,908 KB |
testcase_03 | AC | 79 ms
22,884 KB |
testcase_04 | AC | 81 ms
24,812 KB |
testcase_05 | AC | 78 ms
20,916 KB |
testcase_06 | AC | 80 ms
22,836 KB |
testcase_07 | AC | 80 ms
22,704 KB |
testcase_08 | AC | 79 ms
22,892 KB |
testcase_09 | AC | 79 ms
22,836 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(9,19): warning FS0025: Incomplete pattern matches on this expression. For example, the value '"a"' may indicate a case not covered by the pattern(s).
ソースコード
open System type Sol() = member this.Solve() = let ar = Array.create 10 true let N = stdin.ReadLine() |> int for i = 0 to (N-1) do let S = stdin.ReadLine().Split() match S.[4] with | "NO" -> ( for j = 0 to 3 do ar.[int S.[j]] <- false ) | "YES" -> ( for j = 0 to 9 do if (j <> (int S.[0])) && (j <> (int S.[1])) && (j <> (int S.[2])) && (j <> (int S.[3])) then ar.[j] <- false ) Array.findIndex (fun e -> e = true ) ar |> printfn "%d" let mySol = new Sol() mySol.Solve()