Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# 813~
# 解法 826
# 各数字について，２進数に直したときの各桁の値を計算する．(桁数＊(0,1))の形を持ったリストに対して,各桁数ごとの値で
# 足し合わせていく．各桁ごとに(0,1)の要素数をかけ合わせて，最後に足し合わせれば答えになる
# 計算量は　O(N*60)くらい
# 実装， 思ったよりもかんたんだったけど，やっぱり単純なケースで間違っていることがわかってやり直さないといけなかった
# 結果はあってるだろうけどTLEが出て困る

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

Large = 10**9 + 7
BA = [[0,0] for _ in range(60)] # <2^60なので
pow260 = pow(2,60)
for a in A:
    a = a + pow260
    a_bin = bin(a)
    for i,ab in enumerate(a_bin[::-1][:-3]): # 最初の'0x'みたいなのを取り除く，あと最初につけた'1'を除く
        ab = int(ab)
        BA[i][ab] += 1
ans = 0
for i,ba in enumerate(BA):
    ans += ba[0] * ba[1] * pow(2,i,Large)
    ans %= Large

print(ans)







Fixed submission:
##かっこいい実装
import numpy as np
#mod = 10**9+7
#n = int(input())
#a = np.fromstring(input(), dtype = np.int64, sep = ' ')
#
#result = 0
#for i in range(60):
#    count_one = int((a&1).sum())
#    result += count_one*(n-count_one)*(2**i)
#    a >>= 1
#print(result%mod)

N = int(input())
A = np.fromstring(input(),dtype = np.int64, sep = ' ')
Large = 10**9 + 7
ans = 0
for i in range(60):
    sum1 = int((A&1).sum())
    ans += sum1*(N-sum1) * 2**i
    #ans %= Large
    A>>=1 # A = A>>1とする
print(ans%Large)

Buggy python submission (verdict: Time Limit Exceeded):
# 813~
# 解法 826
# 各数字について，２進数に直したときの各桁の値を計算する．(桁数＊(0,1))の形を持ったリストに対して,各桁数ごとの値で
# 足し合わせていく．各桁ごとに(0,1)の要素数をかけ合わせて，最後に足し合わせれば答えになる
# 計算量は　O(N*60)くらい

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

Large = 10**9 + 7
BA = [[0,0] for _ in range(60)] # <2^60なので
for a in A:
    a = a + pow(2,60)
    a_bin = bin(a)
    for i,ab in enumerate(a_bin[::-1][:-3]): # 最初の'0x'みたいなのを取り除く，あと最初につけた'1'を除く
        ab = int(ab)
        BA[i][ab] += 1
ans = 0
for i,ba in enumerate(BA):
    ans += ba[0] * ba[1] * pow(2,i,Large)
    ans %= Large

print(ans)







Fixed submission:
##かっこいい実装
import numpy as np
#mod = 10**9+7
#n = int(input())
#a = np.fromstring(input(), dtype = np.int64, sep = ' ')
#
#result = 0
#for i in range(60):
#    count_one = int((a&1).sum())
#    result += count_one*(n-count_one)*(2**i)
#    a >>= 1
#print(result%mod)

N = int(input())
A = np.fromstring(input(),dtype = np.int64, sep = ' ')
Large = 10**9 + 7
ans = 0
for i in range(60):
    sum1 = int((A&1).sum())
    ans += sum1*(N-sum1) * 2**i
    #ans %= Large
    A>>=1 # A = A>>1とする
print(ans%Large)
Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
# 100 * 21 = 105 * 20, が最大の可換性であり，基本的にはあり得る組み合わせは非常に少ない.それ以外は
# 100 * 26 = 104 * 25, 100 * 101 = 101 * 100,これとかはありえない,100*51 = 102 * 50,とかはありえる
#100000/100 = 1000せいぜい商品の合計は1000子である10^3ならば10^3 ６回ループ回してもOK10^18になるけど?
import sys

for a in range(1001): # aだけは1000の場合がありうるわ
    for b in range(1000):
        for c in range(1000):
            for d in range(1000):
                for e in range(1000):
                    for f in range(1000):
                        price = a*100 + b*101 + c*102 + d*103 + e*104 + f*105
                        rest = X-price
                        if rest >= 0:
                            if rest%100 == 0 or rest%101==0 or rest%102==0 or rest%103==0 or rest%104==0 or rest%105==0:
                                print(1)
                                sys.exit()

print(0)



Fixed submission:
X = int(input())

# iがそんなに大きくないのでiについてループを回すことができる．dpiを"i円の買い物ができるなら，"Yes","No""とします．
# dp0を'Yes'とする．
# dpi-100~105が'True'ならばdpiは0．それ以外ならば'False'
DP = [True]
for i in range(X): 
    if i+1-105 >= 0:
        DP_n = DP[i+1-100] or DP[i+1-101] or DP[i+1-102] or DP[i+1-103] or DP[i+1-104] or DP[i+1-105] 
    elif i+1==100 or i+1==101 or i+1==102 or i+1==103 or i+1==104:
        DP_n = True
    else:
        DP_n = False
    DP.append(DP_n)
print(int(DP[X]))
Buggy python submission (verdict: Runtime Error):
A,B,X = map(int, input().split())
# 整数Nにたいして値段PはP=A*N + B*d(N), P<Xとなる最大のNを求める.ただしN<10**9以下となる
#d(N)に対して探索してみる
ketasu = 20
while True:
    if ketasu == 0:  # なんにもかえない場合
        n=0
        break
    Bdn = ketasu * B
    min_num = 1*10**(ketasu-1)
    min_P = min_num * A + Bdn
    if min_P > X:
        ketasu -= 1
        continue
    else:  # Xで買える桁数
        n = (X-Bdn) // A
        if n == 10**ketasu:  # 10**ketasu 
            n -= 1
        break
if n>10**9:
    print(10**9)
else:
    print(n)



Fixed submission:
S=input()
days = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-days.index(S))
Buggy python submission (verdict: Runtime Error):
r = int(input)
print(r**2)


Fixed submission:
r = int(input())
print(r**2)
Buggy python submission (verdict: Runtime Error):
# 指定された距離で何個の木を作成することができるかを計算する
import bisect
import itertools
N = int(input())
D = list(map(int, input().split()))
node_dis = [1] # 距離iのノードの個数をi番目の要素として格納したリスト
flag_none = False

# 頂点１から深さは決まっている.深さni毎に前のni-1のノードから重複を許してc_ni個選んでノードに繋げばよい
if not D[0] == 0:
    print(0)
    flag_none = True

else:
    D.sort()  # 昇順でソート
    for i in range(1,N):
        if i == 1 and bisect.bisect_left(D,1) >= 2:  # 0が２つ以上ある場合
            print(0)
            flag_none = True
            break
        else:
            if i ==1:
                del D[0]
            index = bisect.bisect_left(D,i+1)
            new_num = index 
            node_dis.append(new_num)
            del D[:index]
            if index==0: 
                if not D == []:
                    print(0)
                    flag_none = True
                break
if flag_none == False:
    sum = 1
    for (ind, di) in enumerate(node_dis): 
        if ind > 0:
            sum *= node_dis[ind-1] ** di
    print(sum)




Fixed submission:
# 2つの相異なる正整数でNを何通りで表すことができるか
N = int(input())
if N % 2 ==0:
    print(N//2-1)
else:
    print(N//2)
Buggy python submission (verdict: Runtime Error):
# 指定された距離で何個の木を作成することができるかを計算する
import bisect
import itertools
N = int(input())
D = list(map(int, input().split()))
#
D=list(map(int,inp.split()))
print(D)

node_dis = [1] # 距離iのノードの個数をi番目の要素として格納したリスト
flag_none = False

# 頂点１から深さは決まっている.深さni毎に前のni-1のノードから重複を許してc_ni個選んでノードに繋げばよい
if not D[0] == 0:
    print(0)
    flag_none = True

else:
    D.sort()  # 昇順でソート
    for i in range(1,N):
        if i == 1 and bisect.bisect_left(D,1) >= 2:  # 0が２つ以上ある場合
            print(0)
            flag_none = True
            break
        else:
            index = bisect.bisect_left(D,i+1)
            new_num = index - sum(node_dis)
            node_dis.append(new_num)
            if new_num == 0:
                if not index == N:
                    print(0)
                    flag_none = True
                break

if flag_none == False:
    sum = 1
    for (ind, di) in enumerate(node_dis): 
        if ind > 0:
            sum *= node_dis[ind-1] ** di
    print(sum)




Fixed submission:
# 指定された距離で何個の木を作成することができるかを計算する
import bisect
import itertools
N = int(input())
D = list(map(int, input().split()))
node_dis = [1] # 距離iのノードの個数をi番目の要素として格納したリスト
flag_none = False

# 頂点１から深さは決まっている.深さni毎に前のni-1のノードから重複を許してc_ni個選んでノードに繋げばよい
if not D[0] == 0:
    print(0)
    flag_none = True

else:
    D.sort()  # 昇順でソート
    for i in range(1,N):
        if i == 1 and bisect.bisect_left(D,1) >= 2:  # 0が２つ以上ある場合
            print(0)
            flag_none = True
            break
        else:
            if i ==1:
                del D[0]
            index = bisect.bisect_left(D,i+1)
            new_num = index 
            node_dis.append(new_num)
            del D[:index]
            if index==0: 
                if not D == []:
                    print(0)
                    flag_none = True
                break
if flag_none == False:
    sum = 1
    for (ind, di) in enumerate(node_dis): 
        if ind > 0:
            sum *= node_dis[ind-1] ** di
    print(sum%998244353)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int,input().split()))

# 昇順にする
L.sort()

count=0
for i in range(N):
    for j in range(i+1,N):
        for n in range(j+1,N):
            if L[n]<L[i]+L[j]:
                count+=1
            else:
                break
print(count)







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

# 昇順にする
L.sort()

import bisect
count=0
for i in range(N):
    for j in range(i+1,N):
        # 2分探索を使うことでn^2*log(n)の探索で終わる,このindexは新たにL[i]+L[j]が挿入できるindexなので、このindex-1が条件を満たす最大のcのindex
        maximum_index = bisect.bisect_left(L,L[i]+L[j])
        count+= maximum_index-1 - j 
print(count)
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(input().split())

shusseki_jun=[' ' for _ in range(N)]
for i in range(N):
    ind = A[i]
    shusseki_jun[int(ind)-1] = str(i+1)

print(' '.join(shusseki_jun))


Fixed submission:
N=int(input())
if N%2 ==0:
    print(0.5)
else:
    print((N//2+1)/N)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(input().split())

shusseki_jun=['' for _ in range(N)]
for i in range(N):
    shusseki_jun[i] = str(A.index(str(i+1))+1)
print(' '.join(shusseki_jun))


Fixed submission:
N=int(input())
if N%2 ==0:
    print(0.5)
else:
    print((N//2+1)/N)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(input().split())

shusseki_jun=[' ' for _ in range(N)]
for i in range(N):
    shusseki_jun[i] = str(A.index(str(i+1))+1)

print(' '.join(shusseki_jun))


Fixed submission:
N=int(input())
A=list(input().split())

shusseki_jun=[' ' for _ in range(N)]
for i in range(N):
    ind = A[i]
    shusseki_jun[int(ind)-1] = str(i+1)

print(' '.join(shusseki_jun))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(input().split())


shusseki_jun = [str(A.index(str(i))+1) for i in range(1,N+1)]
print(' '.join(shusseki_jun))


Fixed submission:
N=int(input())
A=list(input().split())

shusseki_jun=[' ' for _ in range(N)]
for i in range(N):
    ind = A[i]
    shusseki_jun[int(ind)-1] = str(i+1)

print(' '.join(shusseki_jun))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N,K,Q = map(int,input().split())
ans_list=[int(input()) for _ in range(Q)]
points=np.full((N,), K)
for ans_person in ans_list:
    points[:ans_person-1] -= 1
    points[ans_person:] -= 1

winner = points>0
for person in winner:
    if person==True:
        print('Yes')
    else:
        print('No')


Fixed submission:
import numpy as np
# 実行時間が遅いのでは早くする

N,K,Q = map(int,input().split())
# Q門について成果した人の番号
ans_list=[int(input()) for _ in range(Q)]
# 参加者ごとに正解した数
answer_num=[0 for _ in range(N)]

for ans_person in ans_list:
    answer_num[ans_person-1] += 1

for an in answer_num:
    # 持ち点から(問題数-正解数)を引いた数が残りの得点である
    if K-(Q-an) > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
A = list(map(int,input().split()))
# 解法 bisectとsort(最初だけ)を使う
# dequeでbisectって使えんのかなぁ？
A.sort()
from collections import deque
A = deque(A)
import bisect
for i in range(M):
    a = A.pop()
    new = a/2
    bisect.insort_left(A,new)   # やってることはA.sort(bisect.bisect_left(A,new),new)
import numpy as np
A = np.array(A,dtype=np.int64)
print(A.sum())



Fixed submission:
# 優先度付きキューとか言うものが使えるかどうかが鍵になる
# pythonでは標準でheapqが使える．要するにヒープのこと．ただしヒープでは最小値しか取り出せないのでそこに注意する必要がある.
# 計算量はO(log(N))になる
N,M = map(int,input().split())
A = list(map(int,input().split()))
# 解法 bisectとsort(最初だけ)を使う
# dequeでbisectって使えんのかなぁ？
#A.sort()
#from collections import deque
#A = deque(A)
A = [-a for a in A]
import heapq
heapq.heapify(A)
import bisect
for i in range(M):
    a = heapq.heappop(A)
    new = a/2
    # listに挿入する．ただしpythonのlistは可変長配列なので，linked-listではない.それゆえ末尾や先頭以外への要素の挿入はO(N)かかる
    #bisect.insort_left(A,new)   # やってることはA.sort(bisect.bisect_left(A,new),new)．
    heapq.heappush(A,new)
import numpy as np
A = np.array(A,dtype=np.int64)
print(-A.sum())

Buggy python submission (verdict: Time Limit Exceeded):
N,M=map(int, input().split())
goods_value = list(map(int, input().split()))

#　貪欲法で現在の価格がもっとも大きいものから割引券を使っていけば良い
current_value=goods_value
left_discount = M
while left_discount > 0:
    maximum_value = max(current_value)
    maximum_value_index = current_value.index(maximum_value)
    current_value[maximum_value_index] = maximum_value // 2
    left_discount -= 1
    
print(sum(current_value))




Fixed submission:
# 優先度付きキューとか言うものが使えるかどうかが鍵になる
# pythonでは標準でheapqが使える．要するにヒープのこと．ただしヒープでは最小値しか取り出せないのでそこに注意する必要がある.
# 計算量はO(log(N))になる
N,M = map(int,input().split())
A = list(map(int,input().split()))
# 解法 bisectとsort(最初だけ)を使う
# dequeでbisectって使えんのかなぁ？
#A.sort()
#from collections import deque
#A = deque(A)
A = [-a for a in A]
import heapq
heapq.heapify(A)
import bisect
for i in range(M):
    a = heapq.heappop(A)
    new = a/2
    # listに挿入する．ただしpythonのlistは可変長配列なので，linked-listではない.それゆえ末尾や先頭以外への要素の挿入はO(N)かかる
    #bisect.insort_left(A,new)   # やってることはA.sort(bisect.bisect_left(A,new),new)．
    heapq.heappush(A,new)
import numpy as np
A = np.array(A,dtype=np.int64)
print(-A.sum())
Buggy python submission (verdict: Time Limit Exceeded):
H,W = map(int,input().split())

S = [[] for _ in range(H)]
for i in range(H):
    S[i] = list(input())

HL = [[] for _ in range(H)]
WL = [[] for _ in range(W)]
for i in range(H):
    for j in range(W):
        if S[i][j] == '#':
            HL[i].append(j)

for j in range(W):
    for i in range(H):
        if S[i][j] == '#':
            WL[j].append(i)
ma = 0
import bisect
for i in range(H):
    for j in range(W):
        if S[i][j] == '.':
            ind = bisect.bisect_left(HL[i],j)
            if ind == 0:
                left = -1
            else:
                left = HL[i][ind-1]
            if ind == len(HL[i]):
                right = W
            else:
                right = HL[i][ind]
            wid_num = right-left-1

            ind_2 = bisect.bisect_left(WL[j],i)
            if ind_2 == 0:
                up = -1
            else:
                up = WL[j][ind_2-1]
            if ind_2 == len(WL[j]):
                down = H
            else:
                down = WL[j][ind_2]
            len_num = down-up-1

            ma = max(ma,wid_num+len_num-1)
print(ma)








Fixed submission:
H,W = map(int,input().split())

S = [[] for _ in range(H)]
for i in range(H):
    S[i] = list(input())

HL = [[] for _ in range(H)]
WL = [[] for _ in range(W)]
for i in range(H):
    for j in range(W):
        if S[i][j] == '#':
            HL[i].append(j)

for j in range(W):
    for i in range(H):
        if S[i][j] == '#':
            WL[j].append(i)
ma = 0
import bisect
for i in range(H):
    for j in range(W):
        if S[i][j] == '.':
            ind = bisect.bisect_left(HL[i],j)
            if ind == 0:
                left = -1
            else:
                left = HL[i][ind-1]
            if ind == len(HL[i]):
                right = W
            else:
                right = HL[i][ind]
            wid_num = right-left-1

            ind_2 = bisect.bisect_left(WL[j],i)
            if ind_2 == 0:
                up = -1
            else:
                up = WL[j][ind_2-1]
            if ind_2 == len(WL[j]):
                down = H
            else:
                down = WL[j][ind_2]
            len_num = down-up-1

            ma = max(ma,wid_num+len_num-1)
print(ma)
Buggy python submission (verdict: Runtime Error):
# DPをとく
import math
N=int(input())
H=list(map(int,input().split()))
dp = [math.inf for _ in range(N)] # 足場Nまでにたどり着くときの最小コストとする
dp[0]=0
for i in range(N):
    if i+1<N:
        dp[i+1] = min(dp[i+1],dp[i]+abs(H[i+1]-H[i]))
    if i+2<N:
        dp[i+2] = min(dp[i+2],dp[i]+abs(H[i+2]-H[i]))
print(dp[N-1])


Fixed submission:
# DPをとく
inf=10**10
N=int(input())
H=list(map(int,input().split()))
dp = [inf for _ in range(N)] # 足場Nまでにたどり着くときの最小コストとする
dp[0]=0
for i in range(N):
    if i+1<N:
        dp[i+1] = min(dp[i+1],dp[i]+abs(H[i+1]-H[i]))
    if i+2<N:
        dp[i+2] = min(dp[i+2],dp[i]+abs(H[i+2]-H[i]))
print(dp[N-1])
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
H=list(map(int,input().split()))
INF=10**10
dp=[INF for _ in range(N)]
dp[0]=0
for i in range(N):
    for k in range(1,K+1):
        if i+k<N:
            dp[i+k] = min(dp[i+k],dp[i]+abs(H[i+k]-H[i]))
print(dp[N-1])

Fixed submission:
N,K=map(int,input().split())
# numpyを使うと早い操作も単純だから
import numpy as np
H=np.array(list(map(int,input().split())))
INF=10**10
dp=np.array([INF for _ in range(N)])
dp[0]=0
for i in range(N):
    dp[i:i+K+1] = np.minimum(dp[i:i+K+1],dp[i]+np.abs(H[i:i+K+1]-H[i]))
print(dp[N-1])
Buggy python submission (verdict: Runtime Error):
S = list(input())
S.sort()
import bisect
a_uni = ord('a')

Search = S
for i in range(26):
    char = chr(a_uni+i)
    if Search[0] == char:
        ind = bisect.bisect_right(S,char)
        Search = S[ind:]
        continue
    print(char)
    exit()
print('None')




Fixed submission:
S = list(input())
S.sort()
import bisect
a_uni = ord('a')

Search = S
for i in range(26):
    char = chr(a_uni+i)

    if Search and Search[0] == char:
        ind = bisect.bisect_right(S,char)
        Search = S[ind:]
        continue
    print(char)
    exit()
print('None')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = list(map(int, input().split()))
sum = 0
for i in range(n):
  for j in range(i):
    sum += x[i]*x[j]
print(sum % (pow(10,9)+7))

Fixed submission:
n = int(input())
lst = list(map(int, input().split()))
s = (sum(lst)**2 - sum([z**2 for z in lst]))//2
print(s % (pow(10,9)+7))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
count = 0
su = sum[a]
for i in range(n-1):
	su -= a[i]
	count += a[i]*su
print(count%(10**9+7))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
count = 0
su = sum(a)
for i in range(n-1):
	su -= a[i]
	count += a[i]*su
print(count%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(n-1):
	count += a[i]*sum(a[i+1:])
print(count%(10**9+7))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
count = 0
su = sum(a)
for i in range(n-1):
	su -= a[i]
	count += a[i]*su
print(count%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(n-1):
	for j in range(i+1,n):
		count += a[i]*a[j]
print(count%(10**9+7))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
count = 0
su = sum(a)
for i in range(n-1):
	su -= a[i]
	count += a[i]*su
print(count%(10**9+7))
Buggy python submission (verdict: Runtime Error):
words = input()
if words[-1] != s:
  words += "s"
else:
  words += "es"
print(words)
  
 
  


Fixed submission:
words = input()
if words[-1] != "s":
  words += "s"
else:
  words += "es"
print(words)

Buggy python submission (verdict: Runtime Error):
words = input()
if words[-1] != s:
  words += 's'
else:
  words += 'es'
print(words)
  
 
  

Fixed submission:
words = input()
if words[-1] != "s":
  words += "s"
else:
  words += "es"
print(words)
Buggy python submission (verdict: Runtime Error):
D,T,S = list(int,input().split())
if D <= T * S:
  print("YES")
else:
  print("NO")


Fixed submission:
D,T,S=map(int,input().split())
if D<=T*S:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
D, T, S = list(map((int, input().split()))
               if D <= T * S:
                 print("YES")
               else:
                 print("NO")

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

Fixed submission:
N, X, T = map(int, input().split())
if N % X == 0:
  print(int(N / X) * T)
else:
  print(int(N / X + 1) * T)

Buggy python submission (verdict: Runtime Error):
N, X, T = map(int, input().split())
print(ceil(N / X) * T)

Fixed submission:
N, X, T = map(int, input().split())
if N % X == 0:
  print(int(N / X) * T)
else:
  print(int(N / X + 1) * T)

Buggy python submission (verdict: Runtime Error):
N = int(input())
X = int(input())
T = int(input())
print(ceil(N / X) * T)

Fixed submission:
N, X, T = map(int, input().split())
if N % X == 0:
  print(int(N / X) * T)
else:
  print(int(N / X + 1) * T)

Buggy python submission (verdict: Runtime Error):
N = int(input())
X = int(input())
T = int(input())
print(ceil(N / X) * T)


Fixed submission:
N, X, T = map(int, input().split())
if N % X == 0:
  print(int(N / X) * T)
else:
  print(int(N / X + 1) * T)

Buggy python submission (verdict: Runtime Error):
N = int(input())
X = int(input())
T = int(input())
if N % X == 0:
  print(N / X * T)
else:
  print(N / X * T + T)

Fixed submission:
N, X, T = map(int, input().split())
if N % X == 0:
  print(int(N / X) * T)
else:
  print(int(N / X + 1) * T)
Buggy python submission (verdict: Runtime Error):
S =input()
if str(S) = "ABC":
  print("ARC")
else:
  print("ABC")


Fixed submission:
s=input()

if s.find('B')==1:
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
S =input()
if S = "ABC":
  print("ARC")
else:
  print("ABC")


Fixed submission:
s=input()

if s.find('B')==1:
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
S =map(int, input().split(""))
if S = "ABC":
  print("ARC")
else:
  print("ABC")


Fixed submission:
s=input()

if s.find('B')==1:
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
S =map(int, input().split())
if S = "ABC":
  print("ARC")
else:
  print("ABC")

Fixed submission:
s=input()

if s.find('B')==1:
  print('ARC')
else:
  print('ABC')
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
S = math.ceil(N / 1.08)
if S * 1.08 != N:
  print(":(")
else:
  print(S)


Fixed submission:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 == M2:
  print("0")
else:
  print("1")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = math.ceil(N / 1.08)
if S * 1.08 != N:
  print(":(")
else:
  print(S)


Fixed submission:
import math
N = int(input())
S = math.ceil(N / 1.08)
if S * 1.08 <= N - 1 or S * 1.08 >= N + 1:
  print(":(")
else:
  print(S)

Buggy python submission (verdict: Runtime Error):
import math.
N = int(input())
S = N / 1.08
if math.ceil(S) * 1.08 != N:
  print(":(")
else:
  print(math.ceil(S))


Fixed submission:
import math
N = int(input())
S = math.ceil(N / 1.08)
if S * 1.08 <= N - 1 or S * 1.08 >= N + 1:
  print(":(")
else:
  print(S)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = N / 1.08
if math.ceil(S) * 1.08 != N:
  print(":(")
else:
  print(math.ceil(S))


Fixed submission:
import math
N = int(input())
S = math.ceil(N / 1.08)
if S * 1.08 <= N - 1 or S * 1.08 >= N + 1:
  print(":(")
else:
  print(S)