Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import decimal

a,b = input().split()
a = int(a)
b = decimal(b)
b = b*100
b = int(b)

ans = a*b
ans //= 100

print(int(ans))

Fixed submission:
import decimal

a,b = input().split()
a = int(a)
b = decimal.Decimal(b)
b = b*100
b = int(b)

ans = a*b
ans //= 100

print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
import queue

n,m = map(int, input().split())
routs = [[] for i in range(n + 1)]
for i in range(m):
    a, b = map(int,input().split())
    routs[a].append(b)
    routs[b].append(a)

parent = [-1] * (n-1)
visit = ["yet"]*(n)
visit[0] = "done"
q = queue.Queue()
q.put(1)
while -1 in parent:
    temp = q.get()
    for i in routs[temp]:
        if visit[i-1] == "yet":
            q.put(i)
            if parent[i-2] == -1:
                parent[i-2] = temp
            visit[i-1] = "done"
print("Yes")
for i in parent:
    print(i)    
    

Fixed submission:
import queue

n,m = map(int, input().split())
routs = [[] for i in range(n + 1)]
for i in range(m):
    a, b = map(int,input().split())
    routs[a].append(b)
    routs[b].append(a)

parent = [-1] * (n-1)
visit = ["yet"]*(n)
visit[0] = "done"
q = queue.Queue()
q.put(1)
while not q.empty():
    temp = q.get()
    for i in routs[temp]:
        if visit[i-1] == "yet":
            q.put(i)
            if parent[i-2] == -1:
                parent[i-2] = temp
            visit[i-1] = "done"

print("Yes")
for i in parent:
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ss =[]
num = 0

for i in range(n):
    s = input()
    if s not in ss:
        ss.append(s)
        num += 1

print(num)


Fixed submission:
n = int(input())
ss = {}
num = 0

for i in range(n):
    s = input()
    if s not in ss:
        ss[s] = "exist"
        num += 1

print(num)
Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())

print(-((-b+1)//(a-1)))

Fixed submission:
a,b=input().split()

print(-((-int(b)+1)//(int(a)-1)))
Buggy python submission (verdict: Runtime Error):
n=int(input)

print(n*(n-1)/2)

Fixed submission:
n=int(input())

print(n*(n-1)//2)
Buggy python submission (verdict: Runtime Error):
n=int(input())
ss=[input() for i in range(n)]
d={}
for i in ss:
    a=[c for c in ss]
    a.sort()
    a="".join(a)

    if a in d:
        ans+=d[a]
        d[a]+=1
    
    else:
        d[a]=1

print(ans)

Fixed submission:
n=int(input())
ss=[input() for i in range(n)]
d={}
ans=0
for i in ss:
    a=[c for c in i]
    a.sort()
    a="".join(a)

    if a in d:
        ans+=d[a]
        d[a]+=1
    
    else:
        d[a]=1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[int(input())  for i in range(n)]
b=list(a)
b.remove(max(a))
for i in range(n):
    if a[i] != max(a):
        print(max(a))
    else:
        print(max(b))


Fixed submission:
n=int(input())
a=[int(input())  for i in range(n)]
b=list(a)
b.remove(max(a))
maxa=max(a)
maxb=max(b)
for i in range(n):
    if a[i] != maxa:
        print(maxa)
    else:
        print(maxb)
Buggy python submission (verdict: Runtime Error):
import math

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

cdlcm=c*d/math.gcd(c,d)

cd=b//c-(a-1)//c
dd=b//d-(a-1)//d
cdd=b//(cdlcm)-(a-1)//(cdlcm)

print(round(b-a+1-(cd+dd-cdd)))

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

def gcd(a,b):
    if a==0:
        return b
    else:
        return gcd(b%a,a)

cdlcm=c*d//gcd(c,d)

cd=b//c-(a-1)//c
dd=b//d-(a-1)//d
cdd=b//(cdlcm)-(a-1)//(cdlcm)

print(round(b-a+1-(cd+dd-cdd)))
Buggy python submission (verdict: Runtime Error):
n, m=map(int,input().split())
a=list(map(int, input().split()))

for i in range(m):
    b,c=map(int,input().split())
    a+=([c]*b)

a.sort()
a.reverse()
ans=0

for i in range(n):
    ans+=a[i]

print(ans)


Fixed submission:
a,b=map(int,input().split())
if a>=13:
    print(b)
elif 6<=a<13:
    print(b//2)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
n, m=map(int,input().split())
a=list(map(int, input().split()))

for i in range(m):
    b,c=map(int,input().split())
    a+=([c]*b)

a.sort()
a.reverse()
ans=0

for i in range(n):
    ans+=a[i]

print(ans)


Fixed submission:
a,b=map(int,input().split())
if a>=13:
    print(b)
elif 6<=a<13:
    print(b//2)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
import math

n,k = list(map(int,input().split()))
ans=0
for i in range(1,n+1):
    ans+=1/2**(math.ceil(math.log(k//i,2)))

ans/=n

print(ans)


Fixed submission:
import math

n,k = list(map(int,input().split()))
ans=0
if n<=k:
    for i in range(1,n+1):
        ans+=1/2**(math.ceil(math.log(k/i,2)))
else:
    ans+=n-k+1
    for i in range(1,k):
        ans+=1/2**(math.ceil(math.log(k/i,2)))

ans/=n

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n=list(map(int,input().split()))
i,j,k=0,0,0
R,G,B=0,0,0
c=0
while R<n:
    R=r*i
    while G<=n-R:
        G=g*j
        B,k=0,0
        while B<=n-R-G:
            B=b*k
            if n-R-G-B==0:
                c+=1
            k+=1
        j+=1
    i+=1
    G,j=0,0
print(c)


Fixed submission:
r,g,b,n=list(map(int,input().split()))
i,j=0,0
R,G=0,0
c=0
while R<=n:
    while G<=n-R:
        if (n-R-G)%b==0:
            c+=1
        G+=g
    G=0
    R+=r

print(c)

Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n=list(map(int,input().split()))
i,j,k=0,0,0
R,G,B=0,0,0
c=0
while R<n:
    R=r*i
    while G<=n-R:
        G=g*j
        B,k=0,0
        while B<=n-R-G:
            B=b*k
            if n-R-G-B==0:
                c+=1
            k+=1
        j+=1
    i+=1
    G,j=0,0
print(c)


Fixed submission:
r,g,b,n=list(map(int,input().split()))
i,j=0,0
R,G=0,0
c=0
while R<=n:
    while G<=n-R:
        if (n-R-G)%b==0:
            c+=1
        G+=g
    G=0
    R+=r

print(c)
Buggy python submission (verdict: Runtime Error):
N,M,C=map(int,input().split())
b=list(map(int,input().split()))
a=list(map(int,input().split()) for _ in range(N))
ab=list(range(N))
count=0

for i in range(N):
    for j in range(M):
        ab[i]+=a[i][j]*b[j]
    if ab[i]+C>0:
        count+=1

print(count)


Fixed submission:
N,M,C=map(int,input().split())
b=list(map(int,input().split()))
a=list(range(N))
for i in range(N):
    a[i]=list(map(int,input().split()))
ab=list(range(N))
count=0

for i in range(N):
    ab[i]=0
    for j in range(M):
        ab[i]+=a[i][j]*b[j]
    if ab[i]+C>0:
        count+=1

print(count)

Buggy python submission (verdict: Runtime Error):
N,M,C=map(int,input().split())
b=list(map(int,input().split()))
a=list(map(int,input().split() for _ in range(N))
ab=list(range(N))
count=0

for i in range(N):
    for j in range(M):
        ab[i]+=a[i][j]*b[j]
    if ab[i]+C>0:
        count+=1
print(count)

Fixed submission:
N,M,C=map(int,input().split())
b=list(map(int,input().split()))
a=list(range(N))
for i in range(N):
    a[i]=list(map(int,input().split()))
ab=list(range(N))
count=0

for i in range(N):
    ab[i]=0
    for j in range(M):
        ab[i]+=a[i][j]*b[j]
    if ab[i]+C>0:
        count+=1

print(count)
Buggy python submission (verdict: Runtime Error):
vs = input()
t = input()

stri = []
mincount = -1
for i in range(len(s)-len(t)+1):
    count = 0
    for j in range(len(t)):
        if(s[i+j] == t[j]):
            count+= 1
    mincount = max(mincount,count) 
print(len(t) - mincount)

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

stri = []
for i in range(len(s)-len(t)+1):
    j = i+ len(t)
    stri.append(s[i:j])
maxcount = 0
for i in range(len(stri)):
    count = 0
    for j in range(len(t)):
        if(stri[i][j] ==t[j]):
            count+= 1
    maxcount = max(maxcount,count) 
print(len(t)-maxcount)
Buggy python submission (verdict: Time Limit Exceeded):
MODINT = 1000000007
n = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(n-1):
    for j in range(i+1,n):
        ans += A[i]*A[j]
        ans %= MODINT
print(ans)


Fixed submission:
MODINT = 1000000007
n = int(input())
A = list(map(int,input().split()))
prodsum = [0]*n
prodsum[0] = A[0]
for i in range(1,n):
    prodsum[i] = prodsum[i-1]+A[i]
# print(prodsum)
ans = 0
for i in range(n-1):
    ans += A[i]*(prodsum[-1]-prodsum[i])
print(ans%MODINT)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
H,W = map(int,input().split())
Ch,Cw = map(int,input().split())
Dh,Dw = map(int,input().split())
S = []
for _ in range(H):
    S.append(list(input()))

warp = [[-1 for i in range(W)]for j in range(H)]

Q = deque([[Ch-1,Cw-1,0]])

while(len(Q) != 0):
    x,y,cnt = Q.popleft()

    if(warp[x][y] != -1):   #skip
        continue

    warp[x][y] = cnt        #ワープ魔法の必要回数

    for tx in range(-2,3):
        for ty in range(-2,3):
            nx = x+tx
            ny = y+ty

            if(0 <= nx < H and 0<= ny < W and S[nx][ny]=="."):
                if(abs(tx)+abs(ty) == 1):#徒歩で行けるなら前に
                    Q.appendleft([nx,ny,cnt])
                elif(abs(tx)+abs(ty)>=2):#ワープ魔法必要なら後ろに
                    Q.append([nx,ny,cnt+1])

print(warp[Dh-1][Dw-1])

Fixed submission:
from collections import deque
H,W = map(int,input().split())
Ch,Cw = map(int,input().split())
Dh,Dw = map(int,input().split())
S = []
for _ in range(H):
    S.append(list(input()))

warp = [[-1 for i in range(W)]for j in range(H)]

Q = deque([[Ch-1,Cw-1,0]])

while(len(Q) != 0):
    x,y,cnt = Q.popleft()

    if(warp[x][y] != -1):   #skip
        continue

    warp[x][y] = cnt        #ワープ魔法の必要回数

    for tx in range(-2,3):
        for ty in range(-2,3):
            nx = x+tx
            ny = y+ty

            if(0 <= nx < H and 0<= ny < W and S[nx][ny]=="."):
                if(abs(tx)+abs(ty) == 1):#徒歩で行けるなら前に
                    Q.appendleft([nx,ny,cnt])
                elif(abs(tx)+abs(ty)>=2):#ワープ魔法必要なら後ろに
                    Q.append([nx,ny,cnt+1])

print(warp[Dh-1][Dw-1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
stone = list(map(str,input()))
ind = [""]*2
ind[0] = list()
ind[1] = list()
R = 0
W = 0
for i in range(N):
    if(stone[i]=="W"):
        ind[0].append(i)
        W += 1
    else:
        ind[1].append(i)
        R += 1
ind[1].reverse()
ans = 0

if(W != R):
    print(min(W,R))
else:
    for i in range(N):
        if(ind[0][i]>ind[1][i]):
            break
        ans+=1
    print(ans)


Fixed submission:
N = int(input())
stone = list(map(str,input()))
ind = [""]*2
ind[0] = list()
ind[1] = list()
R = 0
W = 0
for i in range(N):
    if(stone[i]=="W"):
        ind[0].append(i)
        W += 1
    else:
        ind[1].append(i)
        R += 1
newR = 0
for i in range(R):
    if(i != ind[1][i]):
        break
    newR+= 1


newind =list(reversed(ind[1]))
ans2 = 0

# print(W,R,newR)
# print(ind[1],newind)
if(newR != R):
    ans1 = min(W,R-newR)
else:
    ans1 = min(W,R)
if(ans1 != 0):
    for i in range(N//2):
        if(ind[0][i]>newind[i]):
            break
        ans2+=1
        # print(ans)
print(min(ans1,ans2))
Buggy python submission (verdict: Time Limit Exceeded):
n,m,k = map(int,input().split())
shelfA = list(map(int,input().split()))
shelfB = list(map(int,input().split()))
prodA = [0]*(n+1)
prodB = [0]*(m+1)
for i in range(1,n+1):
    prodA[i] = prodA[i-1] + shelfA[i-1]
for i in range(1,m+1):
    prodB[i] = prodB[i-1] + shelfB[i-1]
if(n>=m):
    ans = [-1]*(n+1)
    for i in range(n+1):
        for j in range(m+1):
            if(prodA[i]+prodB[j] <= k):
                if(ans[i] < i+j):
                    ans[i] = i+j
            else:
                break
            
else:
    ans = [-1]*(m+1)
    for i in range(m+1):
        for j in range(n+1):
            if(prodB[i]+prodA[j] <= k):
                if(ans[i] < i+j):
                    ans[i] = i+j
            else:
                break

print(max(ans))

Fixed submission:
n,m,k = map(int,input().split())
shelfA = list(map(int,input().split()))
shelfB = list(map(int,input().split()))
prodA = [0]*(n+1)
prodB = [0]*(m+1)
for i in range(1,n+1):
    prodA[i] = prodA[i-1] + shelfA[i-1]
for i in range(1,m+1):
    prodB[i] = prodB[i-1] + shelfB[i-1]

ans = -1
j = m
for i in range(n+1):
    if(prodA[i]>k):
        break
    while(prodB[j] > k - prodA[i]):
        # print(prodB[j],j,k-prodA[i])
        j-=1
    # print(ans)
    ans = max(ans,i+j)



print(ans)
Buggy python submission (verdict: Runtime Error):
x,n = map(int,input().split())
nump = list(map(int,input().split()))
nump.sort()
x_ind = -1
nump_io = [0]*100
for i in range(n):
    nump_io[nump[i]-1] = 1
    if(nump[i]==x):
        x_ind = i
if(x_ind == -1):
    print(x)
else:            
    for i in range(1,50):
        if(nump_io[(x-1)-i] == 0):
            print(x-i)
            break
        if(nump_io[(x-1)+i] == 0):
            print(x+i)
            break



Fixed submission:
x,n = map(int,input().split())
nump = list(map(int,input().split()))
nump.sort()
x_ind = -1
nump_io = [0]*103
for i in range(n):
    nump_io[nump[i]-1] = 1
    if(nump[i]==x):
        x_ind = i
if(x_ind == -1):
    print(x)
else:            
    for i in range(1,51):
        if(nump_io[(x-1)-i] == 0):
            print(x-i)
            break
        if(nump_io[(x-1)+i] == 0):
            print(x+i)
            break
# print(nump_io)

Buggy python submission (verdict: Runtime Error):
x,n = map(int,input().split())
nump = list(map(int,input().split()))
nump.sort()
x_ind = -1
nump_io = [0]*100
for i in range(n):
    nump_io[nump[i]-1] = 1
    if(nump[i]==x):
        x_ind = i
if(x_ind == -1):
    print(x)
else:            
    for i in range(1,50):
        if(list_io[(x-1)-i] == 0):
            print(x-i)
            break
        if(list_io[(x-1)+i] == 0):
            print(x+i)
            break



Fixed submission:
x,n = map(int,input().split())
nump = list(map(int,input().split()))
nump.sort()
x_ind = -1
nump_io = [0]*103
for i in range(n):
    nump_io[nump[i]-1] = 1
    if(nump[i]==x):
        x_ind = i
if(x_ind == -1):
    print(x)
else:            
    for i in range(1,51):
        if(nump_io[(x-1)-i] == 0):
            print(x-i)
            break
        if(nump_io[(x-1)+i] == 0):
            print(x+i)
            break
# print(nump_io)

Buggy python submission (verdict: Runtime Error):
x,n = map(int,input().split())
nump = list(map(int,input().split()))
if(n ==0):
    print(x)
else:
    list_io = [0]*100
    for i in range(n):
        list_io[nump[i]-1] = 1
    # print(list_io)
    for i in range(1,50):
        if(list_io[(x-1)-i] == 0):
            print(x-i)
            break
        if(list_io[(x-1)+i] == 0):
            print(x+i)
            break
    # print("?")

Fixed submission:
x,n = map(int,input().split())
nump = list(map(int,input().split()))
nump.sort()
x_ind = -1
nump_io = [0]*103
for i in range(n):
    nump_io[nump[i]-1] = 1
    if(nump[i]==x):
        x_ind = i
if(x_ind == -1):
    print(x)
else:            
    for i in range(1,51):
        if(nump_io[(x-1)-i] == 0):
            print(x-i)
            break
        if(nump_io[(x-1)+i] == 0):
            print(x+i)
            break
# print(nump_io)
Buggy python submission (verdict: Runtime Error):
n = int(input())
A = list(map(int,input().split()))
A.sort()
# print(A)
multiple = [0]*(A[-1]+1)
for i in range(n):
    now = A[i]
    while(now <= A[-1]):
        multiple[now] += 1
        now += now
ans = 0
for i in range(N):
    if(multiple[A[i]] == 1):
        ans += 1
# print(multiple)
print(ans)

Fixed submission:
n = int(input())
A = list(map(int,input().split()))
A.sort()
# print(A)
multiple = [0]*(A[-1]+1)
for i in range(n):
    now = A[i]
    while(now <= A[-1]):
        multiple[now] += 1
        now += A[i]
ans = 0
for i in range(n):
    if(multiple[A[i]] == 1):
        ans += 1
# print(multiple)
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
A = list(map(int,input().split()))
A.sort()
A.reverse()
# print(A)
ans = 0
for i in range(max(len(A)-1,1)):
    f = 1
    for j in range(i+1,len(A)):
        # print(A[i],A[j])
        if(A[i]%A[j] == 0):
            # print("__")
            f = 0
            break
    if(f == 0):
        ans += 1
if(A[-2] == A[-1]):
    ans += 1
print(n-ans)


Fixed submission:
n = int(input())
A = list(map(int,input().split()))
A.sort()
# print(A)
multiple = [0]*(A[-1]+1)
for i in range(n):
    now = A[i]
    while(now <= A[-1]):
        multiple[now] += 1
        now += A[i]
ans = 0
for i in range(n):
    if(multiple[A[i]] == 1):
        ans += 1
# print(multiple)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
num = list(map(int,input().split()))
num.sort()
if(num[0] == 0):
    print(0)
else:
    ans = 1
    for i in range(len(num)):
        ans *= num[i]
        if(ans >1000000000000000000):
            print(-1)
            return
    print(ans)

Fixed submission:
n = int(input())
num = list(map(int,input().split()))
num.sort()
if(num[0] == 0):
    print(0)
else:
    ans = 1
    f = 0
    for i in range(len(num)):
        ans *= num[i]
        if(ans >1000000000000000000):
            print(-1)
            f = 1
            break
    if(f == 0):
        print(ans)

Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;

int main() {
    int N;
    cin >> N;
    long long k;
    long long ans = 1;
    for (int i = 0; i<N; i++ ){
        cin >>k;
        // cout << i << endl;
        ans *= k;
    } 
    if(ans > pow(10,18)){
        cout << -1;
    }else{
        cout << ans;
    }

    return 0;
}

Fixed submission:
n = int(input())
num = list(map(int,input().split()))
num.sort()
if(num[0] == 0):
    print(0)
else:
    ans = 1
    f = 0
    for i in range(len(num)):
        ans *= num[i]
        if(ans >1000000000000000000):
            print(-1)
            f = 1
            break
    if(f == 0):
        print(ans)
Buggy python submission (verdict: Runtime Error):
import math
a,b = map(str,input().split())
a = int(a)
b_ =str()
for i in b:
    if(i != "."):
        b_ = b_ +i
# print(b_)
ans = (a*b_)//100
print(ans)

Fixed submission:
import math
a,b = map(str,input().split())
a = int(a)
b_ =str()
for i in b:
    if(i != "."):
        b_ = b_ +i
# print(b_)
b_ = int(b_)
ans = (a*b_)//100
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
a,b = map(str,input().split())
a = int(a)
b.remove(".")
# print(a,b)
b = int(b)
ans = (a*b)//100
print(ans)

Fixed submission:
import math
a,b = map(str,input().split())
a = int(a)
b_ =str()
for i in b:
    if(i != "."):
        b_ = b_ +i
# print(b_)
b_ = int(b_)
ans = (a*b_)//100
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
a,b = map(str,input().split())
a = int(a)
b.remove(,)
# print(a,b)
b = int(b)
ans = (a*b)//100
print(ans)

Fixed submission:
import math
a,b = map(str,input().split())
a = int(a)
b_ =str()
for i in b:
    if(i != "."):
        b_ = b_ +i
# print(b_)
b_ = int(b_)
ans = (a*b_)//100
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
a,b = map(str,input().split())
a = int(a)
b = b.remove(,)
# print(a,b)
b = int((b))
ans = (a*b)//100
print(ans)

Fixed submission:
import math
a,b = map(str,input().split())
a = int(a)
b_ =str()
for i in b:
    if(i != "."):
        b_ = b_ +i
# print(b_)
b_ = int(b_)
ans = (a*b_)//100
print(ans)
Buggy python submission (verdict: Runtime Error):
from math import floor
A,B,N = map(int,input().split())
if(B-1>N):
    Nomin = floor(N)
else:
    Nomin = floor(B-1)

print(Nomin)

Fixed submission:
K =int(input())
A,B = map(int,input().split())
f = 0
for i in range(A,B+1):

    if(i%K==0):
        print("OK")
        f =1
        break

if(f ==0):
    print("NG")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = list(input())
f=0
ijk = list()
for i in range(N):
    for j in range(N):
        for k in range(N):
            if(k>j>i):
                if(k == j+(j-i)):
                    pass
                elif(i == j-(j-k)):
                    pass
                else:
                    ijk.append([i+1,j+1,k+1])
# print(S)
# print(ijk)

for i in range(len(ijk)):
    if(S[ijk[i][0]-1]== S[ijk[i][1]-1]):pass
    elif(S[ijk[i][0]-1]== S[ijk[i][2]-1]):pass
    elif(S[ijk[i][1]-1]== S[ijk[i][2]-1]):pass
    else:f+=1
print(f)

Fixed submission:
N = str(input())
array = list(map(str,N))
i= 0
while all:
    if(array[i]=='7'):
        print("Yes")
        break
    if(i==2):
        print("No")
        break
    i+=1
Buggy python submission (verdict: Time Limit Exceeded):
import math
input_N = int(input())
i = j = k =1

l = sum_gcd=0
for i in range(input_N):
    for j in range(input_N):
        for k in range(input_N):
            l +=1
            sum_gcd += math.gcd(math.gcd(i+1,j+1),k+1)
print(sum_gcd)       

Fixed submission:
import math
input_N = int(input())
i = j = k =1
sum_gcd=0
for i in range(input_N):
    for j in range(input_N):
        for k in range(input_N):
            sum_gcd += math.gcd(math.gcd(i+1,j+1),k+1)
print(sum_gcd)
Buggy python submission (verdict: Runtime Error):
A,B = int(input())
if(A%B == 0):
    print(B/A)
else:
    print(B//A+1)

Fixed submission:
import math
A,B = map(int,input().split())
print(math.ceil((B-1)/(A-1)))
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n = int(input())
seque = deque([i for i in range(1,n+1)])
a = seque.popleft()
seque.append(a)
# 1 2 3 4 5 6 7 8 9 10 11 12 13
# 2 3 4 5 6 7 8 9 10 11 12 13 1 
# print(seque)
ans = 0
for i in range(1,n+1):
    ans += i%seque[i-1]
print(ans)

Fixed submission:
n = int(input())
ans = (n)*(n-1)//2
print(int(ans))