結果
問題 |
No.662 スロットマシーン
|
ユーザー |
|
提出日時 | 2025-01-01 14:03:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 773 bytes |
コンパイル時間 | 330 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2025-01-01 14:03:17 |
合計ジャッジ時間 | 2,523 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 RE * 1 |
ソースコード
dic = {} for i in range(5): a, b = input().split() dic[a] = int(b) dict = {} cnt = 1 for i in range(3): n = int(input()) cnt *= n dd = {} for j in range(n): a = input() if a not in dd: dd[a] = 1 else: dd[a] += 1 for k, v in dd.items(): if k not in dict: dict[k] = [v] else: dict[k].append(v) new_dict = {} for k, v in dict.items(): if len(v) == 3: a = 1 for i in range(3): a *= v[i] a *= 5 new_dict[k] = a else: new_dict[k] = 0 for k, v in dic.items(): dic[k] = new_dict[k] * v total = 0 for v in dic.values(): total += v print(total/cnt) for k in dic.keys(): print(new_dict[k])