結果

問題 No.586 ダブルブッキング
ユーザー ああいいああいい
提出日時 2022-03-30 21:48:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 82,576 KB
実行使用メモリ 53,632 KB
最終ジャッジ日時 2024-04-27 11:27:38
合計ジャッジ時間 1,042 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,944 KB
testcase_01 AC 39 ms
52,708 KB
testcase_02 AC 40 ms
52,692 KB
testcase_03 AC 40 ms
53,192 KB
testcase_04 AC 40 ms
52,768 KB
testcase_05 AC 41 ms
52,920 KB
testcase_06 AC 41 ms
53,632 KB
testcase_07 AC 40 ms
53,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a = int(input())
a += int(input())
N = int(input())
ans = 0
s = set()
for _ in range(N):
    r = int(input())
    if r in s:
        ans += a
    else:
        s.add(r)
print(ans)
0