結果
問題 | No.24 数当てゲーム |
ユーザー | Knium_ |
提出日時 | 2018-01-11 17:19:36 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
AC
|
実行時間 | 16 ms / 5,000 ms |
コード長 | 375 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 10,800 KB |
実行使用メモリ | 7,984 KB |
最終ジャッジ日時 | 2023-08-25 10:54:14 |
合計ジャッジ時間 | 1,242 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
7,964 KB |
testcase_01 | AC | 15 ms
7,980 KB |
testcase_02 | AC | 16 ms
7,872 KB |
testcase_03 | AC | 16 ms
7,980 KB |
testcase_04 | AC | 16 ms
7,984 KB |
testcase_05 | AC | 16 ms
7,932 KB |
testcase_06 | AC | 16 ms
7,872 KB |
testcase_07 | AC | 16 ms
7,908 KB |
testcase_08 | AC | 16 ms
7,980 KB |
testcase_09 | AC | 16 ms
7,984 KB |
ソースコード
import math d = [0 for i in range(10)] for _ in range(int(input())): _cmd = input().split() w,x,y,z = map(int, _cmd[:4]) cmd = _cmd[-1] if cmd == 'NO': d[w] = -math.inf d[x] = -math.inf d[y] = -math.inf d[z] = -math.inf else: d[w] += 1 d[x] += 1 d[y] += 1 d[z] += 1 print(d.index(max(d)))