結果

問題 No.586 ダブルブッキング
ユーザー slimslim
提出日時 2017-11-14 23:31:16
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 6,668 KB
実行使用メモリ 6,124 KB
最終ジャッジ日時 2023-08-16 13:16:12
合計ジャッジ時間 1,023 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,056 KB
testcase_01 AC 11 ms
6,056 KB
testcase_02 AC 11 ms
5,976 KB
testcase_03 AC 13 ms
6,120 KB
testcase_04 AC 12 ms
6,116 KB
testcase_05 AC 11 ms
6,124 KB
testcase_06 AC 11 ms
5,960 KB
testcase_07 AC 11 ms
6,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

yhm = input()
ohm = input()
N = input()
r = []
for i in range(N):
    r.append(input())
    
s = 0
x = 0
N -= 1
while x < N:
    t = r[x]
    k = 0
    n = x + 1
    last = len(r)
    while n < last:
        if t == r[n]:
            k += 1 
        n += 1
    s += k
    if k == 0:
        x += 1
    else:
        x += k

f = (yhm + ohm) * s
print f
0