結果

問題 No.586 ダブルブッキング
ユーザー kohei2019kohei2019
提出日時 2022-02-13 13:21:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 355 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 71,788 KB
最終ジャッジ日時 2023-09-11 15:26:53
合計ジャッジ時間 2,075 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,672 KB
testcase_01 AC 97 ms
71,376 KB
testcase_02 AC 94 ms
71,788 KB
testcase_03 AC 93 ms
71,432 KB
testcase_04 AC 94 ms
71,524 KB
testcase_05 AC 95 ms
71,524 KB
testcase_06 AC 95 ms
71,672 KB
testcase_07 AC 95 ms
71,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
p1 = int(input())
p2 = int(input())
N = int(input())
lsR = [int(input()) for i in range(N)]
cnt = collections.Counter(lsR)

ans = 0
for v in cnt.values():
    ans += (p1+p2)*(v-1)
print(ans)
0