結果

問題 No.586 ダブルブッキング
ユーザー asterisk_tenhouasterisk_tenhou
提出日時 2019-11-08 23:07:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 789 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 7,960 KB
最終ジャッジ日時 2023-10-13 04:46:31
合計ジャッジ時間 1,632 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,828 KB
testcase_01 AC 16 ms
7,836 KB
testcase_02 AC 16 ms
7,960 KB
testcase_03 AC 16 ms
7,828 KB
testcase_04 AC 16 ms
7,848 KB
testcase_05 AC 17 ms
7,872 KB
testcase_06 AC 17 ms
7,844 KB
testcase_07 AC 16 ms
7,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a1 = int(input())
a2 = int(input())
N = int(input())
list = []
for i in range(N):
    n = input()    
    m = n.split()
    p = [int(i) for i in m]
    list.append(p)
a3 = 0
while list != []:
    c = list[0]
    list = [] + list[1:]
    newlist = [i1 for i1 in list if i1 != c]
    d = len(list) - len(newlist)
    a3 = a3 + d
    list = newlist
else:
    a = (a1 + a2) * a3
    print(a)
0