結果

問題 No.662 スロットマシーン
ユーザー tails1434tails1434
提出日時 2020-01-25 21:23:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 788 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 87,244 KB
実行使用メモリ 78,420 KB
最終ジャッジ日時 2023-10-12 04:43:24
合計ジャッジ時間 3,913 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,468 KB
testcase_01 AC 71 ms
71,468 KB
testcase_02 AC 75 ms
75,112 KB
testcase_03 AC 80 ms
75,136 KB
testcase_04 AC 94 ms
76,616 KB
testcase_05 AC 81 ms
75,100 KB
testcase_06 AC 97 ms
76,692 KB
testcase_07 AC 96 ms
76,564 KB
testcase_08 AC 127 ms
78,112 KB
testcase_09 AC 133 ms
78,192 KB
testcase_10 AC 133 ms
78,264 KB
testcase_11 AC 140 ms
78,296 KB
testcase_12 AC 139 ms
78,184 KB
testcase_13 AC 141 ms
78,336 KB
testcase_14 AC 134 ms
78,404 KB
testcase_15 AC 125 ms
78,420 KB
testcase_16 AC 71 ms
71,384 KB
testcase_17 AC 122 ms
78,104 KB
testcase_18 AC 124 ms
78,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    pictures = [None] * 5
    coins = [None] * 5
    for i in range(5):
        pictures[i], coins[i] = input().split()
        coins[i] = int(coins[i])

    n1 = int(input())
    A = [None] * n1
    for i in range(n1):
        A[i] = input()

    n2 = int(input())
    B = [None] * n2
    for j in range(n2):
        B[j] = input()

    n3 = int(input())
    C = [None] * n3
    for k in range(n3):
        C[k] = input()
    a = 0
    U = [0] * 5
    for i, picture in enumerate(pictures):
        A_cnt = A.count(picture)
        B_cnt = B.count(picture)
        C_cnt = C.count(picture)
        U[i] = (A_cnt * B_cnt * C_cnt) * 5
        a += U[i] * coins[i]

    print(a / (n1 * n2 * n3))
    for i in range(5):
        print(U[i])


if __name__ == "__main__":
    main()
0