Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03543 (python)

Fixed submission:
a = str(input())
 
if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] or a[0]==a[1]==a[2]==a[3]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a = int(input())
 
if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] or a[0]==a[1]==a[2]==a[3]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a = int(input())

if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] a[0]==a[1]==a[2]==a[3]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())

if a==b==c or b==c==d or a==b==c==d:
  print('Yes')
else:
  print('No')
Problem p03795 (python)

Fixed submission:
meals = int(input())
price15 = (15*800)-200
print((meals//15)*price15+800*(meals%15))

Buggy submission (verdict: Runtime Error):
meals = int(input)
price15 = (15*800)-200
print((meals//15)*price15+800*(meals%15))
Problem p03860 (python)

Fixed submission:
a, b, c = map(str, input().split())
 
print(a[0] + b[0] + c[0])

Buggy submission (verdict: Runtime Error):
a, b, c = list(str, input().split())

print(a[0] + b[0] + c[0])
Problem p04029 (python)

Fixed submission:
n = int(input())
 
x = 0
 
for i in range(n):
  x += (i+1)
  
print(x)

Buggy submission (verdict: Runtime Error):
n = input()

x = 0

for i in range(n):
  x += (i+1)
  
print(x)
Problem p04030 (python)

Fixed submission:
n = str(input())

ans = ''

for i in range(len(n)):
  if n[i] == 'B':
    ans = ans[:-1]
  elif n[i] == '0':
    ans += '0'
  elif n[i] == '1':
    ans += '1'

print(ans)

Buggy submission (verdict: Runtime Error):
n = str(input())

ans = ''

for i in range(len(n)):
  if n[i] == 'B':
    ans = ans[-1]
  elif n[i] == '0':
    ans += '0'
  elif n[i] == '1':
    ans += '1'

print(ans)
Problem p03076 (python)

Fixed submission:
tot = 0
m = 0
for i in range(5):
    s = int(input())
    if s % 10 == 0:
        rem = 0
    else:
        rem = s%10 - 10
        s = 10*(s//10 + 1)
    m = min(m, rem)
    tot += s

print(tot+m)

Buggy submission (verdict: Runtime Error):
L = []
for _ in range(5):
    n = int(input())
    L.append([n%10, n])

L.sort()
l = 0
for i in range(5):
    if L[i][0] != 0:
        la = L[i][1]
        l = i
        break

tot = 0
for i in range(5):
    if i != l:
        if L[i][1] % 10 != 0:
            k = L[i][1]//10 + 1
        else:
            k = L[i][1]//10
        tot += k*10
tot += la
print(tot)

Buggy submission (verdict: Runtime Error):
L = []
for _ in range(5):
    n = int(input())
    L.append([n%10, n])

L.sort()
for i in range(5):
    if L[i][0] != 0:
        la = L[i][1]
        l = i
        break

tot = 0
for i in range(5):
    if i != l:
        if L[i][1] % 10 != 0:
            k = L[i][1]//10 + 1
        else:
            k = L[i][1]//10
        tot += k*10
tot += la
print(tot)
Problem p03078 (python)

Fixed submission:
x, y, z, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

Q = []
Q.append([A[0]+B[0]+C[0], 0, 0, 0])
M = {(0, 0, 0):True}

def search():
    global Q
    q = Q.pop()
    a = q[1]
    b = q[2]
    c = q[3]
    if a+1 < x and (a+1, b, c) not in M:
        Q.append([A[a+1]+B[b]+C[c], a+1, b, c])
        M[(a+1, b, c)] = True
    if b+1 < y and (a, b+1, c) not in M:
        Q.append([A[a]+B[b+1]+C[c], a, b+1, c])
        M[(a, b+1, c)] = True
    if c+1 < z and (a, b, c+1) not in M:
        Q.append([A[a]+B[b]+C[c+1], a, b, c+1])
        M[(a, b, c+1)] = True
    Q.sort()
    return q[0]

for _ in range(k):
    print(search())

Buggy submission (verdict: Runtime Error):
x, y, z, k = map(int, input().split())
LA = list(map(int, input().split()))
LB = list(map(int, input().split()))
LC = list(map(int, input().split()))
LAB = []
L = []

for i in range(x):
    for j in range(y):
        LAB.append(LA[i]+LB[j])
LAB.sort(reverse=True)
LAB = LAB[:k]

for i in range(k):
    for j in range(z):
        L.append(LAB[i]+LC[j])
L.sort(reverse=True)

for i in range(k):
    print(L[i])
Problem p03157 (python)

Fixed submission:
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

H, W = map(int, input().split())
S = []
for i in [0]*H:
    l = input()
    S.append([1 if x == "#" else -1 for x in l])

bk = 0
wh = 0
def check(S, x, y):
    global bk, wh
    n = S[y][x]
    if n == 0:
        return 
    elif n == 1:
        bk += 1
    elif n == -1:
        wh += 1
    S[y][x] = 0
    if 0 < y and S[y-1][x] == -n:
        check(S, x, y-1)
    if 0 < x and S[y][x-1] == -n:
        check(S, x-1, y)
    if y < H-1 and S[y+1][x] == -n:
        check(S, x, y+1)
    if x < W-1 and S[y][x+1] == -n:
        check(S, x+1, y)
    return 

cnt = 0
for y in range(H):
    for x in range(W):
        if S[y][x] == 1:
            check(S, x, y)
            cnt += wh*bk
            wh = 0
            bk = 0
            
print(cnt)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

H, W = map(int, input().split())
S = []
for i in [0]*H:
    l = input()
    S.append([1 if x == "#" else -1 for x in l])

bk = 0
wh = 0
def check(S, x, y):
    global bk, wh
    n = S[y][x]
    if n == 0:
        return 
    elif n == 1:
        bk += 1
    elif n == -1:
        wh += 1
    S[y][x] = 0
    if 0 < y and S[y-1][x] == -n:
        check(S, x, y-1)
    if 0 < x and S[y][x-1] == -n:
        check(S, x-1, y)
    if y < H-1 and S[y+1][x] == -n:
        check(S, x, y+1)
    if x < W-1 and S[y][x+1] == -n:
        check(S, x+1, y)
    return 

cnt = 0
for y in range(H):
    for x in range(W):
        if S[y][x] == 1:
            check(S, x, y)
            cnt += wh*bk
            wh = 0
            bk = 0
            
print(cnt)
Problem p03316 (python)

Fixed submission:
N = input()
num = list(N)
s = 0
for i in range(len(num)):
  s += int(num[i])
if int(N) % s == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
num = list(N)
s = 0
for i in range(N):
  s += num[i]
if int(N) % s == 0:
  print(Yes)
else:
  print(No)

Buggy submission (verdict: Runtime Error):
N = int(input())
num = list(N)
s = 0
for i in range(len(num)):
  s += num[i]
if N % s == 0:
  print(Yes)
else:
  print(No)
Problem p03324 (python)

Fixed submission:
a, b = map(int, input().split(" "))
b += int(b/100)
print(b*(100**a))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split(" "))
b += int(b/100)
  pass
print(b*(100**a))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input(" "))
if b == 0:
  print(a)
elif b == 1:
  print(a*100)
else:
  print(a*10000)
Problem p03846 (python)

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

for i in list(map(int, input().split())):
    if i in nums:
        nums[i] += 1
        if nums[i] > 2:
            ans = 0
            break
    else:
        nums[i] = 1
        
if n % 2 == 0:
    if 1 in nums.values():
        ans = 0
    else:
        ans = 2**(n//2)
        
else:
    if nums[0] == 1:
        del nums[0]
        if 1 in nums.values():
            ans = 0
        else:
            ans = 2**((n-1)//2)
    else:
        ans = 0
        
print(ans % (10**9+7))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

n = int(input())
A = list(map(int, input().split()))
ans = 0
flag = True
nums = {}
for a in A:
    if a not in nums:
        nums[a] = 1
    else:
        nums[a] += 1

if n % 2 == 1:
    if nums[0] != 1:
        flag = False
    for i in range(n//2):
        if nums[2*(i+1)] != 2:
            flag = False
            break
else:
    for i in range(n//2):
        if nums[2*i+1] != 2:
            flag = False
            break

if flag == True:
    ans = 2**(n//2)
    ans = ans % (10**9 + 7)
    
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

n = int(input())
A = list(map(int, input().split()))
ans = 0
flag = True
nums = {}
for a in A:
    if a in nums:
        nums[a] += 1
    else:
        nums[a] = 1

if n % 2 == 1:
    if nums[0] != 1:
        flag = False
    for i in range(n//2):
        if nums[2*(i+1)] != 2:
            flag = False
            break
else:
    for i in range(n//2):
        if nums[2*i+1] != 2:
            flag = False
            break

if flag == True:
    ans = 2**(n//2)
    ans = ans % (10**9 + 7)
    
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

n = int(input())
A = list(map(int, input().split()))
ans = 0
flag = True
nums = {}
for a in A:
    if a in nums:
        nums[a] += 1
    else:
        nums[a] = 1

if n % 2 == 1:
    if nums[0] != 1:
        flag = False
    for i in range(n//2):
        if nums[2*(i+1)] != 2:
            flag = False
            break
else:
    for i in range(n//2):
        if nums[2*i+1] != 2:
            flag = False
            break

if flag == True:
    ans = 2**(n//2) % (10**9 + 7)
    
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
nums = {0:0}

for i in list(map(int, input().split())):
    if i != 0 and (n%2 == i%2):
        print(0)
        break
    if i in nums:
        if nums[i] <= 1:
            nums[i] += 1
        else:
            print(0)
            break
    else:
        nums[i] = 1
else:        
    if n%2 == 1:
        if nums[0] == 0:
            print(0)
            break
    del nums[0]
    
    if 1 in list(nums.values()):
        print(0)
    else:
        print(2**len(nums.values()))
Problem p02909 (python)

Fixed submission:
import os
import sys

weather_list = ['Sunny', 'Cloudy', 'Rainy']

#today_weather = sys.argv[1]
today_weather = input()

weather_index = weather_list.index(today_weather)

weather_index = weather_index+1 if len(weather_list)-1!=weather_index else 0

print(weather_list[weather_index])

Buggy submission (verdict: Runtime Error):
import os
import sys

weather_list = ['Sunny', 'Cloudy', 'Rainy']

today_weather = sys.argv[1]

weather_index = weather_list.index(today_weather)

weather_index = weather_index+1 if len(weather_list)-1!=weather_index else 0

print(weather_list[weather_index])
Problem p02811 (python)

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

if(a*500>=X):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a,x=map(int, input().split())

if(a*500>=X):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a=int(input())
X=int(input())
if(a*500>=X):
    print('Yes')
else:
    print('No')
Problem p03194 (python)

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

if n == 1:
    print(p)
    exit()

b = [False] * 1000001
prime = []
b[1] = True

for i in range(2, 1000001):
    if b[i]:
        continue
    k = i + i
    while k < 1000001:
        b[k] = True
        k += i

    prime.append(i)

prime_num = [0] * len(prime)

for i in range(len(prime)):
    while p % prime[i] == 0:
        prime_num[i] += 1
        p //= prime[i]

if sum(prime_num) == 0:
    print(1)
    exit()

idx = []
for i in range(len(prime) - 1, -1, -1):
    if prime_num[i] >= n:
        idx.append(i)

if len(idx) == 0:
    print(1)
    exit()

ans = 1
for x in idx:
    a = prime_num[x] // n
    ans *= prime[x] ** a

print(ans)

Buggy submission (verdict: Runtime Error):
n, p = map(int, input().split())

b = [False] * 1000001
prime = []
b[1] = True

for i in range(2, 1000001):
    if b[i]:
        continue
    k = i + i
    while k < 1000001:
        b[k] = True
        k += i

    prime.append(i)

prime_num = [0] * len(prime)

pp = []

for i in range(len(prime)):
    while p % prime[i] == 0:
        pp.append(prime[i])
        prime_num[i] += 1
        p //= prime[i]

if len(pp) == 0:
    print(1)
    exit()

idx = []
for i in range(len(prime) - 1, -1, -1):
    if prime_num[i] >= n:
        idx.append(i)
        break

for i in range(idx[0] - 1, -1, -1):
    if prime_num[i] >= prime_num[idx[0]]:
        idx.append(i)

ans = 1
for x in idx:
    ans *= prime[x]

print(ans)
Problem p04020 (python)

Fixed submission:
#B
n = int(input())
a = []
for i in range(n):
    ai = int(input())
    a.append(ai)

cnt = 0
i = 0
while i < n:
    if a[i] >= 2:
        pairs = a[i] // 2
        cnt += pairs
        a[i] -= (pairs * 2)

    elif a[i] == 1:
        if i + 1 >= n:
            break

        if a[i + 1] > 0:
            cnt += 1
            a[i] -= 1
            a[i + 1] -= 1

        else:
            i += 1

    else:
        i += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
for i in range(n):
    ai = int(input())
    a.append(ai)

cnt = 0
i = 0
while True:
    if a[i] >= 2:
        pairs = a[i] // 2
        cnt += pairs
        a[i] -= (pairs * 2)

    elif a[i] == 1:
        if i + 1 >= n:
            break

        if a[i + 1] > 0:
            cnt += 1
            a[i] -= 1
            a[i + 1] -= 1

        else:
            i += 1

    else:
        i += 1

print(cnt)
Problem p04047 (python)

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

l.sort()
ans = 0

for i in range(n):
    ans += l[2 * i]

print(ans)

Buggy submission (verdict: Runtime Error):
n, x = map(int,input().split())

if x > n // 2:
    x = n - x

xx = x
yy = n - x

ans = n
i = 0

while True:
    ans += 2 * (yy // xx) * xx
    yy %= xx

    if yy == 0:
        ans -= xx
        break

    if yy < xx:
        tmp = xx
        xx = yy
        yy = tmp

print(ans)
Problem p02717 (python)

Fixed submission:
a, b, c = [int(x) for x in input().split()]
a, b =b, a
a, c = c, a
print (a,b,c)

Buggy submission (verdict: Runtime Error):
a, b, c = [int(x) for x in input().split()
a, b = b, a
a, c = c, a
print (a,b,c)
Problem p03308 (python)

Fixed submission:
_ = input()
k = input()
u = list(map(int,k.split()))
u.sort()
print(u[-1] - u[0])

Buggy submission (verdict: Runtime Error):
_ = input()
u = list(map(int,input().split())).sort()
print(u[-1] - u[0])
Problem p02848 (python)

Fixed submission:

N = int(input())
S = input()
list_S = list(S)
list_ans = []

alphabet_number = {'A':1, 'B':2, 'C':3, 'D':4, 'E':5, 'F':6, 'G':7, 'H':8, 'I':9, 'J':10, 'K':11, 'L':12, 'M':13,
            'N':14, 'O':15, 'P':16, 'Q':17, 'R':18, 'S':19, 'T':20, 'U':21, 'V':22, 'W':23, 'X':24, 'Y':25, 'Z':26}

number_alphabet = {1:'A', 2:'B', 3:'C', 4:'D', 5:'E', 6:'F', 7:'G', 8:'H', 9:'I', 10:'J', 11:'K', 12:'L', 13:'M',
                   14:'N', 15:'O', 16:'P', 17:'Q', 18:'R', 19:'S', 20:'T', 21:'U', 22:'V', 23:'W', 24:'X', 25:'Y', 26:'Z'}

for i in range(len(list_S)):
    A = alphabet_number[list_S[i]]
    
    if A + N <= 26:
        B = A + N
    else:
        B = (A+N) - 26
        
    C = number_alphabet[B]
    list_ans.append(C)

print(''.join(list_ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
list_S = list(S)
list_ans = []

alphabet_number = {'a':1, 'b':2, 'c':3, 'd':4, 'e':5, 'f':6, 'g':7, 'h':8, 'i':9, 'j':10, 'k':11, 'l':12, 'm':13,
            'n':14, 'o':15, 'p':16, 'q':17, 'r':18, 's':19, 't':20, 'u':21, 'v':22, 'w':23, 'x':24, 'y':25, 'z':26}

number_alphabet = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e', 6:'f', 7:'g', 8:'h', 9:'i', 10:'j', 11:'k', 12:'l', 13:'m',
                   14:'n', 15:'o', 16:'p', 17:'q', 18:'r', 19:'s', 20:'t', 21:'u', 22:'v', 23:'w', 24:'x', 25:'y', 26:'z'}

for i in range(len(list_S)):
    A = alphabet_number[list_S[i]]
    if A + N <= 26:
        B = A + N
    else:
        B = (A+N) - 26
        
    C = number_alphabet[B]
    list_ans.append(C)

print(''.join(list_ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
list_S = list(S)
list_ans = []

alphabet_number = {'a':1, 'b':2, 'c':3, 'd':4, 'e':5, 'f':6, 'g':7, 'h':8, 'i':9, 'j':10, 'k':11, 'l':12, 'm':13,
            'n':14, 'o':15, 'p':16, 'q':17, 'r':18, 's':19, 't':20, 'u':21, 'v':22, 'w':23, 'x':24, 'y':25, 'z':26}

number_alphabet = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e', 6:'f', 7:'g', 8:'h', 9:'i', 10:'j', 11:'k', 12:'l', 13:'m',
                   14:'n', 15:'o', 16:'p', 17:'q', 18:'r', 19:'s', 20:'t', 21:'u', 22:'v', 23:'w', 24:'x', 25:'y', 26:'z'}

for i in range(len(list_S)):
    A = alphabet_number[list_S[i]]
    if A + N <= 26:
        B = A + N
    else:
        B = (A+N) - 26
        
    C = number_alphabet[B]
    list_ans.append(C)

print(''.join(list_ans))
Problem p02898 (python)

Fixed submission:
N, K = map(int, input().split())
height_list = list(map(int, input().split()))
len_height_list = len(height_list)
count = 0

for i in range(len_height_list):
    if height_list[i] >= K:
        count += 1
        
print(count)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
height_list = list(map, input().split())
len_height_list = len(height_list)
count = 0

for i in range(len_height_list):
    if height_list[i] >= K:
        count += 1
        
print(count)
Problem p02910 (python)

Fixed submission:
Tap = input()
len_Tap = len(Tap)
count = 0

for i in range(len_Tap):
    if (i+1) % 2 == 1:
        if Tap[i] == 'R' or Tap[i] == 'U' or Tap[i] == 'D':
            count += 1
    
    else:
        if Tap[i] == 'L' or Tap[i] == 'U' or Tap[i] == 'D':
            count += 1

if count == len_Tap:
    print('Yes')

else:
    print('No')

Buggy submission (verdict: Runtime Error):
Tap = input()
len_Tap = len(Tap)
count = 0

for i in range(len_Tap):
    if (i+1) % 2 == 1:
        if Tap[i] == 'R' or Tap[i] == 'U' or Tap[i] == 'D':
            count += 1
    
    else:
        if Tap[i] == 'L' or Tap[i] == 'U' or Tap[i] == 'D':
            count += 1

if count == len_Tap:
    print(Yes)

else:
    print(No)
Problem p02911 (python)

Fixed submission:
N, K, Q = map(int, input().split())
list_winner = []
list_point =[]

for _ in range(Q):
    A = int(input())
    list_winner.append(A)

for i in range(N):
    list_point.append(K)
    
    
def add(n):
    return n-Q
    
list_point_new = []

for i in list_point:
    list_point_new.append(add(i))
    
for i in range(Q):
    a = list_winner[i]-1
    list_point_new[a] = list_point_new[a] + 1
    
for i in range(N):
    if list_point_new[i] <= 0:
        print('No')
    else:
        print('Yes')

Buggy submission (verdict: Runtime Error):
N, K, Q = map(int, input().split())
list_winner = []
list_point =[]

for _ in range(Q):
    A = int(input())
    list_winner.append(A)
    list_point.append(K)
    
def add(n):
    return n-Q
    
list_point_new = []

for i in list_point:
    list_point_new.append(add(i))
    
for i in range(Q):
    a = list_winner[i]-1
    list_point_new[a] = list_point_new[a] + 1
    
for i in range(Q):
    if list_point_new[i] <= 0:
        print('No')
    else:
        print('Yes')
Problem p02922 (python)

Fixed submission:
A, B = map(int, input().split())

if A == B:
    print('1')
    
elif B == 1:
    print('0')
    
else:
    AAA = 1
    C = 0
    
    while B > AAA:
        AAA = AAA + A - 1
        C += 1
        
    print(C)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

if A == B:
    print('1')
    
elif B == 1:
    print('0')
    
else:
    AAA = 1
    
    while B > AAA:
        AAA = AAA + A - 1
        
    print(C)
Problem p02945 (python)

Fixed submission:
A, B = map(int, input().split())

list_ans = [A+B, A-B, A*B]

print(max(list_ans))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

list_ans = [A+B, A-B, A*B]

print(max(list_ans))
Problem p02971 (python)

Fixed submission:
N = int(input())
list_A = []

for _ in range(N):
    A = int(input())
    list_A.append(A)
    
A = max(list_A)
index_A = list_A.index(A)

list_B = sorted(list_A, reverse=True)
B = list_B[1]

for i in range(N):    
    if list_A[i] == A:
        print(B)
    else:
        print(A)

Buggy submission (verdict: Runtime Error):
N = int(input())
list_A = []

for _ in range(N):
    A = int(input())
    list_A.append(A)
    
A = max(list_A)
index_A = list_A.index(A)

for i in range(N):    
    if list_A[i] == A:
    	list_B = sorted(list_A, reverse=True)
     	B = list_B[1]
      	print(B)
    else:
        print(A)
Problem p02713 (python)

Fixed submission:
def gcd(a,b):
    if a<b:
        tmp = a
        a = b
        b = tmp
    r = a % b
    while r!=0:
      a = b
      b = r
      r = a % b
    return b
  
def main():
    K = int(input())
    list_ = []
    sum_ = 0
    for i in range(1,K+1):
        for j in range(1,K+1):
            a = gcd(i,j)
            list_.append(a)
    for i in list_:
        for j in range(1,K+1):
            a = gcd(i,j)
            sum_ += a
    print(sum_)

main()

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    if a<b:
        tmp = a
        a = b
        b = tmp
    r = a % b
    while r!=0:
      a = b
      b = r
      r = a % b
    return b
  
def main():
    K = int(input())
    list_ = []
    sum_ = 0
    for i in range(K):
        for j in range(K):
            a = gcd(i,j)
            list_.append(a)
    for i in list_:
        for j in range(K):
            a = gcd(i,j)
            sum_ += a
    print(sum_)

main()
Problem p02743 (python)

Fixed submission:
a, b, c = map(int, input().split())
left = 4 * a * b
right = c - (a + b)
if (right < 0):
  print('No')
  exit()
right = right ** 2
if (left < right):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import math
a, b, c = map(int, input().split())
for i in range(1, 9):
while (a % i == 0 and b % i == 0 and c % i == 0):
  if (a == i or b == i or c == i):
    break
  a /= i
  b /= i
  c /= i
left = a * b
right = (c - (a + b)) / 2
right = right ** 2
if (left < right):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import math
a, b, c = map(int, input().split())
for (a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
  if (a == 2 or b == 2 or c == 2):
    break
  a /= 2
  b /= 2
  c /= 2
left = a * b
right = (c - (a + b)) / 2
right = right ** 2
if (left < right):
  print('Yes')
else:
  print('No')
Problem p02817 (python)

Fixed submission:
s, t = input().split(" ")
print(t+s)

Buggy submission (verdict: Runtime Error):
s, t = input().split(" ")
print(f"{t+s}")
Problem p03067 (python)

Fixed submission:
a,b,c = map(int, input().split())
if min(a,b)<c and max(a,b)>c:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
k = int(input())
t = list(s)
u = ""
for i in range(s):
    if t[i]!=t[k-1]:
        t[i]="*"
for j in range(n):
    u = t[j]+u
print(u)
Problem p03079 (python)

Fixed submission:
a,b,c = map(int, input().split())
if a==b and b==c:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n,q = map(int, input().split())
s = input()
listA = [list(map(str, input().split())) for i in range(q)]
listB =[]
for l in range(n):
    listB.append(1)

def sakana(listC, y):
    if y==0:
        listC[0]=0
    elif y!=0:
        listC[y-1]=listC[y-1]+listC[y]
        listC[y]=0
        
def sakanasan(listD, z):
    if z==n-1 :
        listD[n-1]=0
    elif z!=n-1 :
        listD[z+1]=listD[z+1]+listD[z]
        listD[z]=0

for j in range(q):
    for k in range(n):
        if s[k]==listA[j][0] and listA[j][1]=="L":
            sakana(listB, k)
        elif s[n-1-k]==listA[j][0] and listA[j][1]=="R":
            sakanasan(listB, n-1-k)
print(sum(listB))
Problem p03264 (python)

Fixed submission:
a = int(input())
if a%2==0:
  print(int((a/2)**2))
else:
  print(int(((a-1)/2)*((a+1)/2)))

Buggy submission (verdict: Runtime Error):
a = int(input())
if a%2==0:
  print(int((a/2)**2))
else:
  print(int(((a-1)/2)**2)
Problem p03447 (python)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())
if x-a==0:
   print(0)
else:
   print((x-a)%b)

Buggy submission (verdict: Runtime Error):
x,a,b = map(int, input().split())
if x-a!=0:
	print(0)
else:
	print((x-a)%b)

Buggy submission (verdict: Runtime Error):
x,a,b = map(int, input().split())
print((x-a)%b)

Buggy submission (verdict: Runtime Error):
x,a,b = map(int, input().split())
print(int((x-a)/b))

Buggy submission (verdict: Runtime Error):
x,a,b = map(int, input().split())
print(int((x-a)/b))
Problem p03455 (python)

Fixed submission:
a,b = map(int, input().split())
c=a*b
if c%2==0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a,b = map(int(), input().split())
c=a*b
if c%2==0:
  print("Odd")
else:
  print("Even")