結果
問題 |
No.662 スロットマシーン
|
ユーザー |
![]() |
提出日時 | 2018-11-22 22:26:57 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 535 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-24 17:59:03 |
合計ジャッジ時間 | 2,146 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 17 |
ソースコード
from collections import Counter char_score = {} chars = [] for i in range(5): char, score = input().split() char_score[char] = int(score) chars.append(char) #print(char_score) char_freq = {char:5 for char,score in char_score.items()} for i in range(3): N = int(input()) o = dict(Counter([input() for n in range(N)])) for char in chars: char_freq[char] *= o[char] if o.get(char) else 0 points = sum([char_freq[char]*char_score[char] for char in chars]) print(points/(6**3)) for char in chars: print(char_freq[char])