結果

問題 No.586 ダブルブッキング
ユーザー nebukuro09nebukuro09
提出日時 2017-11-03 22:25:23
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 675 ms
コンパイル使用メモリ 6,744 KB
実行使用メモリ 6,140 KB
最終ジャッジ日時 2023-08-14 16:54:23
合計ジャッジ時間 1,311 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,072 KB
testcase_01 AC 12 ms
6,088 KB
testcase_02 AC 12 ms
6,116 KB
testcase_03 AC 12 ms
6,072 KB
testcase_04 AC 12 ms
6,140 KB
testcase_05 AC 12 ms
6,036 KB
testcase_06 AC 11 ms
6,048 KB
testcase_07 AC 11 ms
6,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p1 = input()
p2 = input()
N = input()
d = {}
for i in xrange(N):
    x = raw_input()
    if x in d:
        d[x] += 1
    else:
        d[x] = 0
ans = 0
for v in d.values():
    ans += v * (p1 + p2)
print ans
0