Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, Q = map(int, input().split())
    S = input()
    for _ in range(Q):
        l, r = map(int, input().split())
        cnt = 0
        s = S[l - 1:r]
        for i in range(r - l):
            if s[i:i + 2] == "AC":
                cnt += 1
        print(cnt)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, Q = map(int, input().split())
    S = input()

    ac_count = [0]
    ac = 0
    for i in range(1, N):
        if S[i - 1:i + 1] == "AC":
            ac += 1
        ac_count.append(ac)

    result = []

    for _ in range(Q):
        left, right = map(int, input().split())
        result.append(ac_count[right - 1] - ac_count[left - 1])

    print(*result, sep="\n")


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, Q = map(int, input().split())
    S = input()
    for _ in range(Q):
        l, r = map(int, input().split())
        print(S[l - 1:r].count('AC'))


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, Q = map(int, input().split())
    S = input()

    ac_count = [0]
    ac = 0
    for i in range(1, N):
        if S[i - 1:i + 1] == "AC":
            ac += 1
        ac_count.append(ac)

    result = []

    for _ in range(Q):
        left, right = map(int, input().split())
        result.append(ac_count[right - 1] - ac_count[left - 1])

    print(*result, sep="\n")


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def factorization(n):

    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


def main():
    N = int(input())
    A = list(map(int, input().split()))

    result = 0

    for a in A:
        fact = factorization(a)[0]
        if fact[0] == 2:
            result += fact[1]
    print(result)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def div_two(num):
    cnt = 0
    while num % 2 == 0:
        num = num // 2
        cnt += 1
    return cnt


def main():
    N = int(input())

    A = list(map(int, input().split()))

    print(sum(div_two(i) for i in A))


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n /= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table


def main():
    N = int(input())
    A = list(map(int, input().split()))

    result = 0

    for a in A:
        result += prime_decomposition(a).count(2)
    print(result)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def div_two(num):
    cnt = 0
    while num % 2 == 0:
        num = num // 2
        cnt += 1
    return cnt


def main():
    N = int(input())

    A = list(map(int, input().split()))

    print(sum(div_two(i) for i in A))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    S = input()
    K = int(input())
    result = set()

    for i in range(len(S) + 1):
        for j in range(i + 1, len(S) + 1):
            result.add(S[i:j])

    print(sorted(result)[K - 1])


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    S = input()
    K = int(input())
    result = set()

    for i in range(5):
        for j in range(len(S)):
            result.add(S[j:j + i + 1])

    print(sorted(result)[K - 1])


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    X = list(map(int, input().split()))
    for i in range(N):
        tmp = X[:i]
        tmp.extend(X[i + 1:])
        tmp.sort()
        print(tmp[N // 2 - 1])


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    X = list(map(int, input().split()))
    x = sorted(X)[N // 2 - 1:N // 2 + 1]
    for i in X:
        print(x[i <= x[0]])


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B, K = map(int, input().split())

    for i in list(range(A, B + 1)):
        if A <= i <= A + K - 1 or B + 1 >= i >= B - K + 1:
            print(i)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B, K = map(int, input().split())
    AK = [i for i in range(A, min(B + 1, A + K))]
    BK = [i for i in range(max(A, B - K + 1), B + 1)]

    result = list(set(AK) | set(BK))
    result.sort()

    for i in result:
        print(i)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B, K = map(int, input().split())

    for i in list(range(A, B + 1)):
        if A - 1 <= i <= A + K - 1 or B + 1 >= i >= B + 1 - K:
            print(i)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B, K = map(int, input().split())
    AK = [i for i in range(A, min(B + 1, A + K))]
    BK = [i for i in range(max(A, B - K + 1), B + 1)]

    result = list(set(AK) | set(BK))
    result.sort()

    for i in result:
        print(i)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B, K = map(int, input().split())

    for i in list(range(A, B + 1)):
        if A - 1 <= i <= A + K - 1 or B + 1 >= i >= B + 1 - K:
            print(i)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B, K = map(int, input().split())
    AK = [i for i in range(A, min(B + 1, A + K))]
    BK = [i for i in range(max(A, B - K + 1), B + 1)]

    result = list(set(AK) | set(BK))
    result.sort()

    for i in result:
        print(i)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import itertools


def main():
    N = int(input())
    S = [input() for _ in range(N)]

    march = []
    for s in S:
        if s[0] in ["M", "A", "R", "C", "H"]:
            march.append(s[0])

    result = []
    for comb in list(itertools.combinations(march, 3)):
        if comb[0] != comb[1] and comb[0] != comb[2] and comb[1] != comb[2]:
            result.append(comb)

    print(len(result))


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from itertools import combinations


def main():

    N = int(input())

    count = {x: 0 for x in "MARCH"}

    for _ in range(N):
        s = input()[0]
        if s in count:
            count[s] += 1

    result = 0
    for a, b, c in combinations("MARCH", 3):
        result += count[a] * count[b] * count[c]

    print(result)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from bisect import bisect_left


def main():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    C = list(map(int, input().split()))

    A.sort()
    B.sort()
    C.sort()

    result = 0
    for c in C:
        index_c_b = bisect_left(B, c)
        for b in B[:index_c_b]:
            result += bisect_left(A, b)

    print(result)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from bisect import bisect_left, bisect_right


def main():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    C = list(map(int, input().split()))

    A.sort()
    B.sort()
    C.sort()

    result = 0
    for b in B:
        a = bisect_left(A, b)
        c = bisect_right(C, b)
        result += a * (N - c)

    print(result)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, M = map(int, input().split())
    AB = [list(map(int, input().split())) for _ in range(M)]
    A = [b for a, b in AB if a == 1]
    B = [a for a, b in AB if b == N]

    result = 'IMPOSSIBLE'
    for a in A:
        if a in B:
            result = 'POSSIBLE'
    print(result)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, M = map(int, input().split())
    # AB = [list(map(int, input().split())) for _ in range(M)]
    from_1 = [False] * N
    to_N = [False] * N
    for _ in range(M):
        a, b = map(int, input().split())
        if a == 1:
            from_1[b - 1] = True
        elif b == N:
            to_N[a - 1] = True
    for i in range(1, N):
        if from_1[i] and to_N[i]:
            print('POSSIBLE')
            break
    else:
        print('IMPOSSIBLE')


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, M = map(int, input().split())
    AB = [list(map(int, input().split())) for _ in range(M)]
    A = [ab for ab in AB if ab[0] == 1]
    B = [ab for ab in AB if ab[1] == N]

    result = 'IMPOSSIBLE'
    for a in A:
        for b in B:
            if a[1] == b[0]:
                result = 'POSSIBLE'
    print(result)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, M = map(int, input().split())
    # AB = [list(map(int, input().split())) for _ in range(M)]
    from_1 = [False] * N
    to_N = [False] * N
    for _ in range(M):
        a, b = map(int, input().split())
        if a == 1:
            from_1[b - 1] = True
        elif b == N:
            to_N[a - 1] = True
    for i in range(1, N):
        if from_1[i] and to_N[i]:
            print('POSSIBLE')
            break
    else:
        print('IMPOSSIBLE')


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = list(map(int, input().split()))

    result = []

    for i in range(1, N):
        result.append(abs(sum(A[:i]) - sum(A[i:])))
    print(min(result))


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = list(map(int, input().split()))

    A_sum = sum(A)
    tmp = 0

    result = []

    for a in A:
        tmp += a
        result.append(abs(A_sum - tmp * 2))
    print(min(result[:-1]))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = list(map(int, input().split()))
    result = []

    for i in range(N):
        if i % 2:
            result.append(A[i])
        else:
            result.insert(0, A[i])

    if N % 2:
        print(*result)
    else:
        print(*result[::-1])


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import collections


def main():
    N = int(input())
    A = list(map(int, input().split()))

    result = collections.deque()

    for i in range(N):
        if i % 2 == N % 2:
            result.append(A[i])
        else:
            result.appendleft(A[i])
    print(*result)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = list(map(int, input().split()))
    result = []

    for a in A:
        result.append(a)
        result = result[::-1]

    print(*result)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import collections


def main():
    N = int(input())
    A = list(map(int, input().split()))

    result = collections.deque()

    for i in range(N):
        if i % 2 == N % 2:
            result.append(A[i])
        else:
            result.appendleft(A[i])
    print(*result)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from itertools import combinations


def main():
    N = int(input())
    S = [int(input()) for _ in range(N)]
    result = 0

    for i in range(1, N + 1):
        for c in list(combinations(S, i)):
            tmp = max([0 if sum(c) % 10 == 0 else sum(c)])
            result = max(result, tmp)
    print(result)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    S = [int(input()) for _ in range(N)]

    S.sort()
    result = sum(S)

    if result % 10 == 0:
        for s in S:
            if s % 10:
                print(result - s)
                exit()
    else:
        print(result)
        exit()

    print(0)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    S = list(input().split())
    reslut = ''
    for s in S:
        if S == 'B':
            reslut.pop()
        else:
            reslut.append(s)
    print(reslut)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    S = list(input())
    reslut = []
    for s in S:
        if s == 'B' and len(reslut) == 0:
            continue
        elif s == 'B':
            reslut.pop()
        else:
            reslut.append(s)
    print(''.join(reslut))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, K = map(int, input().split())
    D = set(list(map(int, input().split())))
    F = set(list(range(10))) - D
    result = ''
    for n in str(N):
        if int(n) in F:
            result += n
        else:
            result += str(min([f for f in F if f > int(n)]))
    print(result)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, K = map(int, input().split())
    D = list(input().split())

    while True:
        if all([True if n not in D else False for n in list(str(N))]):
            break
        N += 1
    print(N)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
value = input().split()
age = int(value[0])
cost = int(value[1])

if(age >= 6 and age<= 12):
    result = cost // 2
elif(age <= 5):
    result = 0

print(result)


Fixed submission:
value = input().split()
age = int(value[0])
cost = int(value[1])

if(age >= 6 and age<= 12):
    cost = cost // 2
elif(age <= 5):
    cost = 0

print(cost)
Buggy python submission (verdict: Runtime Error):
order_time = [0, 0, 0, 0, 0]
order = len(order_time)
time = 0
last_order = 9
count_change = 0

for i in range(0, order):
    order_time[i] = int(input())
    if (order_time[i] % 10 != 0) and (order_time[i] % 10 <= last_order % 10):
        last_order = order_time[i]
        count_change += 1

if count_change == 0:
    last_order = order_time[i]

for i in range(0, order):
    if order_time[i] % 10 != 0:
        time += order_time[i] // 10 * 10 + 10
    else:
        time += order_time[i]

time -= last_order // 10 * 10 + 10
time += last_order

print(time)
order_time = [0, 0, 0, 0, 0]
order = len(order_time)
time = 0
last_order = 9
count_change = 0

for i in range(0, order):
    order_time[i] = int(input())
    if (order_time[i] % 10 != 0) and (order_time[i] % 10 <= last_order % 10):
        last_order = order_time[i]
        count_change += 1

for i in range(0, order):
    if order_time[i] % 10 != 0:
        time += order_time[i] // 10 * 10 + 10
    else:
        time += order_time[i]

if count_change == 0:
    last_order = order_time[i]
else:
    time -= last_order // 10 * 10 + 10
    time += last_order

print(time)


Fixed submission:
order_time = [0, 0, 0, 0, 0]
order = len(order_time)
time = 0
last_order = 9
count_change = 0

for i in range(0, order):
    order_time[i] = int(input())
    if (order_time[i] % 10 != 0) and (order_time[i] % 10 <= last_order % 10):
        last_order = order_time[i]
        count_change += 1

for i in range(0, order):
    if order_time[i] % 10 != 0:
        time += order_time[i] // 10 * 10 + 10
    else:
        time += order_time[i]

if count_change == 0:
    last_order = 0
else:
    time -= last_order // 10 * 10 + 10
    time += last_order

print(time)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
max = max(a) + 1
num = [0] * max
for i in a:
    num[i] += 1
ans = 0
for i in range(max):
    if i > num[i]:
        ans += num[i]
    else:
        ans += num[i] - i
print(ans)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))

a.sort()
cnt = 1
ans = 0
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        cnt += 1
        continue

    if cnt >= a[i]:
        ans += cnt - a[i]
    else:
        ans += cnt
    cnt = 1
if cnt >= a[-1]:
    ans += cnt - a[-1]
else:
    ans += cnt
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
f = 2
s = 1
for i in range(n-1):
    l = f + s
    f = s
    s = l
print(l)


Fixed submission:
n = int(input())
l = [2, 1]
for i in range(n-1):
    l.append(l[i] + l[i+1])
print(l[n])
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())

if a + b + c + d == 7:
    print(a, '+', b, '+', c, '+', d, sep='')
elif a + b + c - d == 7:
    print(a, '+', b, '+', c, '-', d, sep='')
elif a + b - c + d == 7:
    print(a, '+', b, '-', c, '+', d, sep='')
elif a + b - c - d == 7:
    print(a, '+', b, '-', c, '-', d, sep='')
elif a - b + c + d == 7:
    print(a, '-', b, '+', c, '+', d, sep='')
elif a - b + c - d == 7:
    print(a, '-', b, '+', c, '-', d, sep='')
elif a - b - c + d == 7:
    print(a, '-', b, '-', c, '+', d, sep='')
elif a - b - c - d == 7:
    print(a, '-', b, '-', c, '-', d, sep='')


Fixed submission:
a, b, c, d = map(int, input())

if a + b + c + d == 7:
    print(a, '+', b, '+', c, '+', d, '=', 7, sep='')
elif a + b + c - d == 7:
    print(a, '+', b, '+', c, '-', d, '=', 7, sep='')
elif a + b - c + d == 7:
    print(a, '+', b, '-', c, '+', d, '=', 7, sep='')
elif a + b - c - d == 7:
    print(a, '+', b, '-', c, '-', d, '=', 7, sep='')
elif a - b + c + d == 7:
    print(a, '-', b, '+', c, '+', d, '=', 7, sep='')
elif a - b + c - d == 7:
    print(a, '-', b, '+', c, '-', d, '=', 7, sep='')
elif a - b - c + d == 7:
    print(a, '-', b, '-', c, '+', d, '=', 7, sep='')
elif a - b - c - d == 7:
    print(a, '-', b, '-', c, '-', d, '=', 7, sep='')
Buggy python submission (verdict: Runtime Error):
sp = input()
t = input()

ls = len(sp)
lt = len(t)
ok = 1
s = list(sp)
print(s)
for i in range(ls):
    ok = 1
    for j in range(lt):
        if (sp[i+j] == t[j]) or (sp[i+j] == '?'):
            continue
        ok = 0
        break
    if ok == 1:
        for si in range(i, i+lt):
            s[si] = t[si - i]
            print(s[si], sep="")
        break

if ok == 1:
    for i in range(ls):
        if s[i] == '?':
            s[i] = 'a'
    print(str(s))
else:
    print("UNRESTORABLE")


Fixed submission:
sp = input()
t = input()

ls = len(sp)
lt = len(t)
ok = 1
s = list(sp)
for i in range(ls-1, -1, -1):
    ok = 1
    for j in range(lt):
        if i + j >= ls:
            ok = 0
            break
        if (sp[i+j] == t[j]) or (sp[i+j] == '?'):
            continue
        ok = 0
        break
    if ok == 1:
        for si in range(i, i+lt):
            s[si] = t[si - i]
        break

if ok == 1:
    print(''.join(s).replace("?", "a"))
else:
    print("UNRESTORABLE")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [0] * 100005
for i in range(N):
    a = int(input())
    A[a] = 1 - A[a]
ans = 0
for i in range(100005):
    ans += A[i]
print(ans)


Fixed submission:
N = int(input())
A = []
for i in range(N):
    a = int(input())
    A.append(a)
A.sort()
ans = 0
cnt = 1
for i in range(N-1):
    if A[i] == A[i + 1]:
        cnt += 1
        continue
    ans += cnt % 2
    cnt = 1
if cnt % 2 == 1:
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
p = list(map(int, input().split()))

ans = 0
for i in range(N):
    if p[i] != i+1:
        continue
    tmp = p[i]
    p[i] = p[i+1]
    p[i+1] = tmp
    ans += 1
print(ans)


Fixed submission:
N = int(input())
p = list(map(int, input().split()))

ans = 0
for i in range(N-1):
    if p[i] != i+1:
        continue
    tmp = p[i]
    p[i] = p[i+1]
    p[i+1] = tmp
    ans += 1
if p[N-1] == N:
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
ans = -float("INF")

x = for x in (a,b):
  for y in (c,d):
    ans = max(ans,X*y)
print(ans)

Fixed submission:
x = int(input())
if x == 1:
  print(0)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
ans = -float("INF")

x = for x in (a,b):
  for y in (c,d):
    ans = max(ans,X*y)
print(ans)

Fixed submission:
a, b, c, d = map(int, input().split())

ans = -float("INF")  # 答えがマイナスになることがあるので、負の無限大を初期値にしておきます

for x in (a, b):
    for y in (c, d):
        ans = max(ans, x * y)

print(ans)
Buggy python submission (verdict: Runtime Error):
D,T,S = map(input().split())
if D/S>=T:
  print("No")
else:
  print("Yes")

Fixed submission:
D,T,S = map(int,input().split())
if D/S>T:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
N,X,T = map(int,input().split())
print(-(-N//X*T)

Fixed submission:
N,X,T = map(int,input().split())
print(-(-N//X)*T)
Buggy python submission (verdict: Runtime Error):
s = map(input().split())
ans = 0

for i in range(3):
  p = "R"*i
  if p in s:
    ans = i
print(ans)

Fixed submission:
s = input()
ans = 0

for i in range(1,4):
  p = "R"*i
  if p in s:
    ans = i
    
print(ans)

Buggy python submission (verdict: Runtime Error):
s = map(input().split())
ans=0

for i in range(3):
  n = i*s
  if n in s:
    print(i)

Fixed submission:
s = input()
ans = 0

for i in range(1,4):
  p = "R"*i
  if p in s:
    ans = i
    
print(ans)
Buggy python submission (verdict: Runtime Error):
x = int(input())

if x=>30:
  print("Yes")
else:
  print("No")

Fixed submission:
x = int(input())

if x>=30:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a = str(input())
if a = str.isupper():
  print("A")
else:
  print("a")

Fixed submission:
α = input()
if α.islower():
  print("a")
else:
  print("A")

Buggy python submission (verdict: Runtime Error):
α　= input()
if α.islower():
  print("A")
else:
  print("a")

Fixed submission:
α = input()
if α.islower():
  print("a")
else:
  print("A")