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

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

total = 1
li.sort()
for a in li:
    if a == 0:
        total = 0
        break
    total *= a
    if 10 ** 18 < total:
        total = -1
        break
print(total)

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

total = 1

if li.index(0):
    total = 0
    print(total)
else:
    for a in li:
        total *= a
        if 10 ** 18 < total:
            total = -1
    print(total)
Problem p02663 (python)

Fixed submission:
H1,M1,H2,M2,K = map(int,input().split())

h = H2 - H1
m = M2 - M1
s = 0

s = h * 60 + m


s = s - K

print(s)

Buggy submission (verdict: Runtime Error):
H1,M1,H2,M2,K = map(int,input().split())
 
h = H2 - H1
m = M2 - M1
s = 0
if h > 0:
    s = h * 60 + m
elif: h == 0:
    s = 24 * 60 + m
else:
    s = (24 + h) * 60 + m

s -= K
print(s)

Buggy submission (verdict: Runtime Error):
H1,M1,H2,M2,K = map(int,input().split())
 
h = H2 - H1
m = M2 - M1
if h > 0:
    s = h * 60 + m
    s -= K
	print(s)
else:
    s = (24 + h) * 60 + m
    s -= K
	print(s)
Problem p02842 (python)

Fixed submission:
n = int(input())
ans = 0
for i in range(1, n+1):
    if int(i * 1.08) == n:
        ans = i

if ans == 0:
    print(":(")
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 0
for i in range(1, N+1):
    if int(i * 1.08) == n:
        ans = i

if ans == 0:
    print(":(")
else:
    print(x)
Problem p02899 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5 + 2)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(1,N + 1):
    if n == N + 1 or n == N:
        print(S[n])
    else:
        print(S[n],end=" ")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(1,N + 1):
    if n == N + 1 or n == N:
        print(S[n])
    else:
        print(S[n],end=" ")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
S = [0] * (10 ** 5)
for i,a in enumerate(A):
    S[a] = i + 1
    # print(A[i] + 1)
    # print(a)

for n in range(N + 1):
    if n != 0:
        print(S[n],end=" ")
Problem p02982 (python)

Fixed submission:
import math
N,D = map(int,input().split())
X = []
c = 0
s = 0
for i in range(N):
    X.append(list(map(int,input().split()))) 
for l in range(N):
    # print(str(l) + "l")
    if l == N - 1:
        break
    for i in range(l+1,N):
        for j in range(D):
            s += abs(X[l][j] - X[i][j]) ** 2
        s = math.sqrt(s)
        if s % 1 == 0:
            c += 1
        # print(str(i) + "i")
        s = 0

print(c)

Buggy submission (verdict: Runtime Error):
Thank you for your comment.
When I run the above code, it just displays the text "Loading...." and doesn't jump to the "login" or "home" page.
I'm not sure which part of the code is the cause, but I'm wondering if initState wasn't called
Problem p03076 (python)

Fixed submission:
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roundup(n):
    return int(math.ceil(n /10)) * 10
def get_digit(number):
    return number % 10   
s = 0
m = []
li = [A, B, C, D, E]
for i in range(len(li)):
    if get_digit(li[i]) >= 1:
        m.append(get_digit(li[i]))
f = False
m.sort()        
for l in range(len(li)):
    if len(m) > 0:
        if m[0] == get_digit(li[l]) and f == False:
            s += li[l]
            f = True
        else:
            s += roundup(li[l])
            # print(roundup(li[l]))
    else:
        s =sum(li)
print(s)

Buggy submission (verdict: Runtime Error):
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roundup(n):
    return int(math.ceil(n /10)) * 10
def get_digit(number):
    return number % 10   
s = 0
m = []
li = [A, B, C, D, E]
for i in range(len(li)):
    if get_digit(li[i]) >= 1:
        m.append(get_digit(li[i]))
f = False
        
for l in range(len(li)):
    if min(m) == get_digit(li[l]) and f == False:
        s += li[l]
        f = True
    else:
        s += roundup(li[l])
print(s)

Buggy submission (verdict: Runtime Error):
import math
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roundup(n):
    return int(math.ceil(n /10)) * 10
def get_digit(number):
    return number // 10**0 % 10   
s = 0
m = []
li = [A, B, C, D, E]
for i in range(len(li)):
    if get_digit(li[i]) >= 1:
        m.append(get_digit(li[i]))
f = False
        
for l in range(len(li)):
    if min(m) == get_digit(li[l]) and f == False:
        s += li[l]
        f = True
    else:
        s += roundup(li[l])
print(s)
Problem p03126 (python)

Fixed submission:
N,M = map(int,input().split())
C = [0] * (M+1)
for i in range(N):
    K = list(map(int, input().split()))
    for k in range(len(K)):
        if k != 0:
            C[K[k]] += 1
count = 0

for c in C:
    if c == N:
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
N.M = map(int,input().split())
C = [0] * (M+1)
for i in range(N):
    K = list(map(int, input().split()))
    for k in range(len(k)):
        C[K[k]] += 1
count = 0

for c in C:
    if c == N:
        count += 1

print(count)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
n1 = int(input())
n2 = int(input())

s = n1 * n2

if s % 2 == 0:
    print("Even")
else:
    print("Odd")
Problem p03493 (python)

Fixed submission:
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
n = input()
li = list(map(int, input().split()))
count = 0


#all 全ての要素がTrueならTrue
while all(a % 2 == 0 for a in li):
    li = [ a / 2 for a in li]
    count += 1
# a,b = map(int, input().split())
print(count)
Problem p03544 (python)

Fixed submission:
N = int(input())
l = 2
l2 = 1

if N == 1:
    print(l2)
    exit()

for i in range(N - 1):
    if i % 2 == 0:
        l = l + l2
    else:
        l2 = l + l2
    
if i % 2 == 1:
    print(l2)
else:
    print(l)

Buggy submission (verdict: Runtime Error):
N = int(input())
l = 2
l2 = 1

for i in range(N - 1):
    if i % 2 == 0:
        l = l + l2
    else:
        l2 = l + l2
    
if i % 2 == 1:
    print(l2)
else:
    print(l)

Buggy submission (verdict: Runtime Error):
N = int(input())
l = 2
l2 = 1

for i in range(N - 1):
    if i % 2 == 0:
        l = l + l2
    else:
        l2 = l + l2
    
if i % 2 == 1:
    print(l2)
else:
    print(l)
Problem p04012 (python)

Fixed submission:
w = input()
A = [0] * 26

for i in w:
    A[ord(i) - 97] += 1

flag = True
for a in A:
    if a % 2 == 1:
        flag = False


if flag == False:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
w = input()
A = [0] * 26

for in in w:
    A[ord(i) - 97] += 1

flag = True
for a in A:
    if a % 2 == 1:
        flag = False


if flag == False:
    print("No")
else:
    print("Yes")
Problem p02702 (python)

Fixed submission:
s = input()
n = len(s)
dp = [1] + [0]*2019
now = 0
i = 1

for c in reversed(s):
    now = (now+i*int(c))%2019
    dp[now] += 1
    i *= 10
    i %= 2019

ans = sum([i*(i-1)/2 for i in dp])
print(int(ans))

Buggy submission (verdict: Runtime Error):
s = list(input())
s = s[::-1]
s = ''.join(s)
n = len(s)
dp = [0]*2018
now = 0

dp[0] = 1
for i in range(n):
    now += 10**i * int(s[i])
    tmp = now % 2019
    dp[tmp] += 1

ans = sum([i*(i-1)/2 for i in dp if i > 1])
print(int(ans))

Buggy submission (verdict: Runtime Error):
s = input()[::-1]
n = len(s)
dp = [0]*2018
now = 0

dp[0] = 1
for i in range(n):
    now += 10**i * int(s[i])
    tmp = now % 2019
    dp[tmp] += 1

ans = sum([i*(i-1)/2 for i in dp if i > 1])
print(int(ans))

Buggy submission (verdict: Runtime Error):
s = input()[::-1]
n = len(s)
dp = [0]*2018
now = 0

dp[0] = 1
for i in range(n):
    now += 10**i * int(s[i])
    tmp = now % 2019
    dp[tmp] += 1

ans = 0
for i in dp:
    ans += i*(i-1)/2

print(int(ans))
Problem p03006 (python)

Fixed submission:
import sys
input = sys.stdin.readline
n = int(input())
b = sorted([list(map(int,input().split())) for i in range(n)])
d = {}
for i in range(n):
    for j in range(i+1,n):
        x = (b[j][0]-b[i][0],b[j][1]-b[i][1])
        if x in d:
            d[x]+=1
        else:
            d[x]=1
if n==1:
    print(1)
else:
    print(n-max(d.values()))

Buggy submission (verdict: Runtime Error):
import sys
import collections
input = sys.stdin.readline
n = int(input())
xy = []
for i in range(n):
    _a,_b = map(int,input().split())
    xy.append([_a,_b])
sxy = sorted(xy)
sxy2 = []
for i in range(1,n):
    sxy2.append(((sxy[i][0]-sxy[i-1][0])**2)+((sxy[i][1]-sxy[i-1][1])**2))
c = collections.Counter(sxy2)
ans = len(sxy2)-max(c.values())+1
print(ans) if ans != 0 else print(1)

Buggy submission (verdict: Runtime Error):
import sys
import collections
input = sys.stdin.readline
n = int(input())
xy = []
for i in range(n):
    _a,_b = map(int,input().split())
    xy.append([_a,_b])
sxy = sorted(xy)
sxy2 = []
for i in range(1,n):
    sxy2.append(((sxy[i][0]-sxy[i-1][0])**2)+((sxy[i][1]-sxy[i-1][1])**2))
c = collections.Counter(sxy2)
ans = len(sxy2)+1-max(c.values())
print(ans) if ans != 0 else print(1)

Buggy submission (verdict: Runtime Error):
import sys
import collections
input = sys.stdin.readline
n = int(input())
xy = []
for i in range(n):
    _a,_b = map(int,input().split())
    xy.append([_a,_b])
sxy = sorted(xy)
sxy2 = []
for i in range(1,n):
    sxy2.append(((sxy[i][0]-sxy[i-1][0])**2)+((sxy[i][1]-sxy[i-1][1])**2))
c = collections.Counter(sxy2)
print(len(sxy2)-max(c.values()) + 1)
Problem p03086 (python)

Fixed submission:
s = input()
acgt = ['A','C','G','T']
cnt = 0
ans = 0
for i in range(len(s)):
    if s[i] in acgt:
        cnt+=1
    else:
        ans = max(ans,cnt)
        cnt = 0
ans = max(ans,cnt)
print(ans)

Buggy submission (verdict: Runtime Error):
s = list(input())
acgt = ['A','C','G','T']
tmp = ''
ans = []
for i in range(len(s)):
    if s[i] in acgt:
        tmp+=s[i]
    else:
        ans.append(tmp)
        tmp = ''
if max(ans)==0:
    print(0)
else:
    print(len(max(ans)))

Buggy submission (verdict: Runtime Error):
s = list(input())
acgt = ['A','C','G','T']
tmp = ''
ans = []
for i in range(len(s)):
    if s[i] in acgt:
        tmp+=s[i]
    else:
        ans.append(tmp)
        tmp = ''
print(len(max(ans)))

Buggy submission (verdict: Runtime Error):
s = list(input())
acgt = ['A','C','G','T']
tmp = ''
ans = []
for i in range(len(s)):
    if s[i] in acgt:
        tmp+=s[i]
    else:
        ans.append(tmp)
        tmp = ''
print(len(max(ans)))
Problem p03087 (python)

Fixed submission:
import sys
input = sys.stdin.readline
n,q = map(int,input().split())
s = input()
t = [0] * (n+1)
for i in range(n):
    t[i+1] = t[i] + (1 if s[i:i+2]=='AC' else 0)
for i in range(q):
    l,r = map(int,input().split())
    print(t[r-1] - t[l-1])

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readlines()
n,q = map(int,input().split())
s = input()
l = []
r = []
cnt = []
for i in range(q):
    _l,_r = [int(i) for i in input().split()]
    l.append(_l)
    r.append(_r)
for i in range(q):
    cnt.append(s[l[i]-1:r[i]].count('AC'))
for i in range(len(cnt)):
    print(cnt[i])

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(999999999999)
input = sys.stdin.readlines()
n,q = map(int,input().split())
s = input()
l = []
r = []
cnt = []
for i in range(q):
    _l,_r = [int(i) for i in input().split()]
    l.append(_l)
    r.append(_r)
for i in range(q):
    cnt.append(s[l[i]-1:r[i]].count('AC'))
for i in range(len(cnt)):
    print(cnt[i])

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readlines()
n,q = map(int,input().split())
s = input()
l = []
r = []
cnt = []
for i in range(q):
    _l,_r = [int(i) for i in input().split()]
    l.append(_l)
    r.append(_r)
for i in range(q):
    cnt.append(s[l[i]-1:r[i]].count('AC'))
for i in range(len(cnt)):
    print(cnt[i])
Problem p03338 (python)

Fixed submission:
n = int(input())
s = list(input())
ans = [i * 0 for i in range(100)]
if n == 2:
    ans.clear()
    if s[0] == s[1]:
        ans.append(1)
    else:
        ans.append(0)
else:
    for i in range(0,n-1):
        tmp1 = list(set(s[:i]))
        tmp2 = list(set(s[i:]))
        for j in range(len(tmp1)):
            if tmp1[j] in tmp2:
                ans[i] += 1
print(max(ans))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
ans = [i * 0 for i in range(51)]
if n == 2:
    ans.clear()
    if s[0] == s[1]:
        ans.append(1)
    else:
        ans.append(0)
else:
    for i in range(n-1):
        tmp1 = list(set(s[:i+1]))
        tmp2 = list(set(s[i:]))
        for j in range(len(tmp1)):
            if tmp1[j] in tmp2:
                ans[i] += 1
print(max(ans))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
ans = [i * 0 for i in range(51)]
for i in range(n-1):
    tmp1 = list(set(s[:i+1]))
    tmp2 = list(set(s[i:]))
    for j in range(len(tmp1)):
        if tmp1[j] in tmp2:
            ans[i] += 1
print(max(ans))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
ans = [i * 0 for i in range(51)]
for i in range(n-1):
    tmp1 = list(set(s[:i+1]))
    tmp2 = list(set(s[i:]))
    for j in range(len(tmp1)):
        if tmp1[j] in tmp2:
            ans[i] += 1
print(max(ans))
Problem p03471 (python)

Fixed submission:
n, Y = map(int, input().split())
ntx = n * 10000
nty = n * 5000
ntz = n * 1000
ans = []
if Y > ntx or ntz > Y:
    ans = [-1, -1, -1]
elif ntx == Y:
    ans = [n, 0, 0]
elif nty == Y:
    ans = [0, n, 0]
elif ntz == Y:
    ans = [0, 0, n]
elif ntx > Y > nty:
    x = 0
    y = n
    z = 0
    for i in range(1, n+1):
        y = n - i
        x = i
        for j in range(0, i+1):
            x = j
            z = i - j
            if 10000*x + 5000*y + 1000*z == Y:
                ans = [x, y, z]
elif nty > Y > ntz:
    x = 0
    y = 0
    z = n
    for i in range(1, n+1):
        z = n - i
        x = i
        for j in range(0, i+1):
            x = j
            y = i - j
            if 10000*x + 5000*y + 1000*z == Y:
                ans = [x, y, z]
if len(ans) == 0:
    ans = [-1, -1, -1]
print(' '.join(map(str, ans)))

Buggy submission (verdict: Runtime Error):
n, yen = map(int, input().split())
for x in range(n+1):
    for y in range(n+1):
        zz = yen - (10000*x + 5000*y)
        if zz%1000 != 0:
            continue
        z = int(zz / 1000)
        if z < 0:
            continue
        if x + y + z == n:
            print(f'{x} {y} {z}')
            exit()
else:
    print('-1 -1 -1')
Problem p03478 (python)

Fixed submission:
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
    t4 = i %10
    t3 = (i %100 -t4) //10
    t2 = (i %1000 -t4 -t3*10) //100
    t1 = (i %10000 -t4 -t3*10 -t2*100) //1000
    t0 = (i %100000 -t4 -t3*10 -t2*100 -t1*1000) //10000
    c = t0 + t1 + t2 + t3 + t4
    if a <= c <= b: ans += i

print(ans)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
    t4 = i %10
    t3 = (i %100 -t4) //10
    t2 = (i %1000 -t4 -t3*10) //100
    t1 = (i %10000 -t4 -t3*10 -t2*100) //1000
    c = t1 + t2 + t3 + t4
    if a <= c <= b: ans += i
if n = 10**4 and a = 1: ans += 1
print(ans)
Problem p03624 (python)

Fixed submission:
S = input()
ans = None
for letter in "abcdefghijklmnopqrstuvwxyz":
    if letter not in S:
        ans = letter
        break
print(ans)

Buggy submission (verdict: Runtime Error):
s = list(input())
s = list(set(s))
s.sort()
print('s:', s)
ans = 'a'
cnt = 0
while True:
    if cnt == 26:
        print(None)
        break
    else:
        if s[cnt] != ans:
            print(ans)
            break
        else:
            ans = chr(ord(ans)+1)
            cnt += 1

Buggy submission (verdict: Runtime Error):
s = list(input())
s = list(set(s))
s.sort()
ans = 'a'
cnt = 0
while True:
    if cnt == 26:
        print('None')
        break
    else:
        if s[cnt] != ans:
            print(ans)
            break
        else:
            ans = chr(ord(ans)+1)
            cnt += 1

Buggy submission (verdict: Runtime Error):
s = list(input())
s = list(set(s))
s.sort()
ans = 'a'
cnt = 0
while True:
    if s[cnt] != ans:
        print(ans)
        break
    else:
        ans = chr(ord(ans)+1)
        cnt += 1
    if cnt == 26:
        print('None')
        break
Problem p02606 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

l, r, d = map(int, readline().split())

if l % d == 0:
    ans = r // d - l // d + 1
else:
    ans = r // d - l // d
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def popcnt(n):
    return bin(n).count("1")


def mod(n, cnt):
    if n == 0:
        return cnt
    n = n % popcnt(n)
    cnt += 1
    return mod(n, cnt)


n = int(readline())
x2 = list(readline().decode().rstrip())
x10 = int(''.join(x2), 2)

c = x2.count('1')
mod1 = x10 % (c + 1)
mod2 = x10 % (c - 1) if c - 1 != 0 else 0

for i in range(n):
    if x2[i] == '0':
        t = (mod1 + pow(2, n - i - 1, c + 1)) % (c + 1)
    else:
        if c - 1 != 0:
            t = (mod2 - pow(2, n - i - 1, c - 1)) % (c - 1)
        else:
            print(0)
            continue
    print(mod(t, 1))
Problem p02658 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, *a = map(int, read().split())
if 0 in a:
    print('0')
    exit()
ans = 1
for x in a:
    ans = ans * x
    if ans > 10 ** 18:
        print('-1')
        exit()
print(ans)

Buggy submission (verdict: Runtime Error):
n, *a = map(int, read().split())
if 0 in a:
    print('0')
    exit()
ans = 1
for x in a:
    ans = ans * x
    if ans > 10 ** 18:
        print('-1')
        exit()
print(ans)
Problem p02683 (python)

Fixed submission:
import numpy as np
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, m, x = map(int, readline().split())
c = [list(map(int, readline().split())) for _ in range(n)]

ans = float('inf')
# bit全探索
for i in range(2 ** n):
    bag = np.empty(m+1)
    total = 0
    for j in range(n):
        if ((i >> j) & 1):
            bag += np.array(c[j])
        if np.amin(bag[1::]) >= x:
            ans = min(ans, bag[0])
            
print('-1'if ans == float('inf') else int(ans))

Buggy submission (verdict: Runtime Error):
import itertools
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, m, x = map(int, readline().split())
c = [list(map(int, readline().split())) for _ in range(n)]

ans = 10 ** 9 + 7
for l in list(itertools.product([0, 1], repeat=n)):
    cart = [0] * (m + 1)
    for i, a in enumerate(l):
        if a == 1:
        array = c[i]
        cart = list(map(lambda x,y: x+y, cart, array))
    if min(cart[1::]) >= x:
        ans = min(ans, cart[0])
print(ans if ans != 10 ** 9 + 7 else '-1')
Problem p02713 (python)

Fixed submission:
import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

k = int(read())
ans = 0
for a in range(1, k + 1):
    for b in range(1, k + 1):
        n = math.gcd(a, b)
        for c in range(1, k + 1):
            ans += math.gcd(n, c)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

k = int(read())
ans = 0
for a in range(1, n+1):
    for b in range(1, n + 1):
        n = math.gcd(a, b)
        for c in range(1, n+1):
            ans += math.gcd(n, c)
print(ans)
Problem p03262 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


n, s = map(int, readline().split())
x = [v-s for v in list(map(int, readline().split()))]

print(abs(gcd(*x)))

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, s, *x = map(int, read().split())
x.append(s)
x.sort()
k = x.index(s)
r = min(abs(x[k + 1] - s), abs(x[k - 1] - s))
for i in reversed(range(r + 1)):
    div = s % i
    bl = True
    for a in x:
        if a % i != div:
            bl = False
            break
    if bl == True:
        print(i)
        exit()
Problem p03407 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, c = map(int, readline().split())

print('Yes' if (a+b) >= c else 'No')

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b = map(int, readline().split())
print(a*b)
Problem p03423 (python)

Fixed submission:
N = int(input())
ans = N // 3
print(ans)

Buggy submission (verdict: Runtime Error):
C = [input() for _ in range(3)]
ans = C[0][0] + C[1][1] + C[2][2]
print(ans)
Problem p03493 (python)

Fixed submission:
list=str(input())
print(list.count("1"))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
count = 0
while all(i % 2 == 0 for i in a):
    a = [i/2 for i in a]
    count += 1
print(count)
Problem p03697 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b = map(int, readline().split())
ans = a+b if (a+b) < 10 else 'error'
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [int(input()) for _ in range(n)]

score = sum(s)
s.sort()
i = 0
while score % 10 == 0:
    score -= s[i]
    i += 1
    if score == 0:
        break
print(score)
Problem p02761 (python)

Fixed submission:
N, M = map(int, input().split())
arr = [list(map(int, input().split())) for _ in range(M)]

for i in range(1000):
    s = str(i)
    if len(s) != N:
        continue

    flg = True
    for j in range(len(arr)):
        if s[arr[j][0]-1] != str(arr[j][1]):
            flg = False
            break

    if flg:
        print(i)
        exit()

print(-1)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
arr = [list(map(int, input().split())) for _ in range(M)]


for i in range(1000):
    t = str(i)
    if len(t) != N:
        continue
    flg=True
    for item in arr:
        if t[item[0]-1] != str(item[i]):
            flg=False
            break

    if flg:
        print(i)
        exit()

print(-1)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
arr = [list(map(int, input().split())) for _ in range(M)]


for i in range(1000):
    t = str(i)
    if len(t) != N:
        continue
    flg=True
    for j in arr:
        if t[j[0]-1] != str(j[i]):
            flg=False
            break

    if flg:
        print(i)
        exit()

print(-1)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
arr = [list(map(int, input().split())) for _ in range(M)]


for i in range(10**(N-1),10**N,1):
    t = str(i)
    flg=True
    for j in arr:
        if t[j[0]-1] != str(j[i]):
            flg=False
            break

    if flg:
        print(i)
        exit()

print(-1)
Problem p02783 (python)

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

import math
print(math.ceil(H/A))

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

for i in range(100000):
    if 2**i <= N and N<2**(i+1):
        print(2**(i+1)-1)
        break