結果

問題 No.662 スロットマシーン
ユーザー 💕💖💞💕💖💞
提出日時 2018-11-22 22:26:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 535 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 11,000 KB
実行使用メモリ 8,792 KB
最終ジャッジ日時 2023-08-26 04:05:01
合計ジャッジ時間 1,825 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,504 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 17 ms
8,612 KB
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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])
0