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

Fixed submission:
###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))
### setting
sys.setrecursionlimit(10 ** 6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------

R = iIn()
G = iIn()

ans = 2 * G - R
print(ans)

Buggy submission (verdict: Runtime Error):
###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))
### setting
sys.setrecursionlimit(10 ** 6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------

R, G = iInM()
ans = 2 * G - R
print(ans)
Problem p03695 (python)

Fixed submission:
import bisect

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

A.sort()

rank = [0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3200, 3200, 3200, 3200, 3200]
n_rank = []
for i in range(1,len(rank)):
  var = bisect.bisect_left(A, rank[i]) - bisect.bisect_left(A, rank[i-1])
  n_rank.append(var)
else:
  n_rank.append(len(A) - bisect.bisect_left(A, rank[-1]))
  
n_color = sum(n_rank[i] != 0 for i in range(len(n_rank)-1))

min_color = max(n_color, 1)
max_color = n_color + n_rank[-1]

print(str(min_color) +' '+ str(max_color))

Buggy submission (verdict: Runtime Error):
import bisect

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

A.sort()

rank = [0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3200, 3200, 3200, 3200, 3200]
n_rank = []
for i in range(1,len(rank)):
  var = bisect.bisect_left(A, rank[i]) - bisect.bisect_left(A, rank[i-1])
  n_rank.append(var)
else:
  n_rank.append(len(A) - bisect.bisect_left(A, rank[-1]))
  
n_color = sum(n_rank[i] != 0 for i in range(len(n_rank)-1))

min_color = max(n_color, 1)
max_color = min(n_color + n_rank[-1])

print(str(min_color) +' '+ str(max_color))

Buggy submission (verdict: Runtime Error):
import bisect

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

A.sort()

rank = [0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3200, 3200, 3200, 3200, 3200]
n_rank = []
for i in range(1,len(rank)):
  var = bisect.bisect_left(A, rank[i]) - bisect.bisect_left(A, rank[i-1])
  n_rank.append(var)
else:
  n_rank.append(len(A) - bisect.bisect_left(A, rank[-1]))
  
n_color = sum(n_rank[i] != 0 for i in range(len(n_rank)-1))

min_color = max(n_color, 1)
max_color = min(n_color + n_rank[-1])

print(str(min_color) +' '+ str(max_color))
Problem p02640 (python)

Fixed submission:
X, Y = map(int, input().split())
ans = 'No'

for i in range(X+1):
    j = X - i
    if (i * 2 + j * 4) == Y:
        ans = 'Yes'

print(ans)

Buggy submission (verdict: Runtime Error):
X, Y = map(int, input().split())
ans = 'No'

for i in X:
    j = X - i
    if (i * 2 + j * 4) == Y:
        ans = 'Yes'

print(ans)

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())

flg = 0
for i in range(1, X):
    j = X - i
    ans = i*2 + j * 4

    if Y == ans:
        print("Yes")
        flg = 1
        break

if flg == 0:
    print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())

flg = 0
for i in range(1, 100):
    j = X - i
    ans = i*2 + j * 4

    if ans == Y:
        print("Yes")
        flg = 1
        break

if flg == 0:
    print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())

for i in range(1, 100):
    j = X - i
    ans = i*2 + j * 4

    if ans == Y:
        print("Yes")
        exit(1)

print("No")
Problem p02681 (python)

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

if s == t[0:-1]:
  
  print('Yes')
  
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
 
if len(s) + 1  == len(t) and s in t:
  print(Yes)
  
else :
  print(No)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()

if len(t) + 1  == len(s) and s in t:
  print(Yes)
  
else :
  print(No)
Problem p02713 (python)

Fixed submission:
import math
from functools import reduce

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

n = int(input())

answer = 0.0

for i in range(1,n+1):
  
  for j in range(1,n+1):
    
    for h in range(1,n+1):
      f = gcd(i,j,h)
      answer += f
      
print(int(answer))

Buggy submission (verdict: Runtime Error):
import fractions

n = int(input())

answer = 0

for i in range(1,n+1):
  
  for j in range(1,n+1):
    
    for h in range(1,n+1):
      f = gractions.gcd(i,j,h)
    	answer += f
Problem p02658 (python)

Fixed submission:
N = int(input())
mylist = list(map(int , input().split(" ")))
result = 1

if 0 in mylist:
    result = 0

else:
    for i in mylist:
        
        if result * i > 10 ** 18:
            result = -1
            break
        else:
            result *= i
            
print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
mylist = (input().split(" "))
result = 1

if 0 in mylist:
    result = 0

else:
    for i in mylist:
        
        if result > 10 ** 18:
            result = -1
            break
        else:
            result *= i
print(result)
Problem p04030 (python)

Fixed submission:
s = input()
txt = []

for c in s:
    if c == 'B':
        if len(txt):
            txt.pop()
    else:
        txt.append(c)

print(''.join(txt))

Buggy submission (verdict: Runtime Error):
s = input()
txt = []

for c in s:
  if c == 'B' && len(txt) > 0:
    txt.pop()
  else:
    txt.append(c)
    
print(''.join(txt))

Buggy submission (verdict: Runtime Error):
s = input()
txt = []

for c in s:
  if c == 'B' and len(txt) > 0:
    txt.pop()
  elif:
    txt.append(c)
    
print(''.join(txt))

Buggy submission (verdict: Runtime Error):
s = input()
txt = []

for c in s:
  if c == 'B' && len(txt) > 0:
    txt.pop()
  elif:
    txt.append(c)
    
print(''.join(txt))
Problem p02684 (python)

Fixed submission:
N,K = map(int,input().split())
A = list(map(int,input().split()))
visited = []
search = set()
now = 1#最初の街にいる
next_town = A[now-1]
count = 1
while(count<=N):
    if next_town in search:#もし次の街が訪れたことがある場合
        break#ループするので抜け出す
    visited.append(now)#今いる街は訪れたこととなるので記録する
    search.add(now)
    next_town = A[now-1]#次に行く街を探す
    now = next_town#次の街に着いたこととして変数を代入
    count += 1

first_roop_city = A[visited[-1]-1]#最初にループした街
first_roop_city_index = visited.index(first_roop_city)#何回目のテレポートにループが始まったか
if K < len(visited):
    print(visited[K])
else:
    visited = visited[first_roop_city_index:]
    L = len(visited)
    print(visited[(K-first_roop_city_index)%L])

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
A = list(map(int,input().split()))
visited = []
search = set()
now = 1#最初の街にいる
next_town = A[now-1]
count = 1
while(count<=N):
    if next_town in search:#もし次の街が訪れたことがある場合
        break#ループするので抜け出す
    visited.append(now)#今いる街は訪れたこととなるので記録する
    search.add(now)
    next_town = A[now-1]#次に行く街を探す
    now = next_town#次の街に着いたこととして変数を代入
    count += 1

first_roop_city = A[visited[-1]-1]#最初にループした街
first_roop_city_index = visited.index(first_roop_city)#何回目のテレポートにループが始まったか
if K <= len(visited):
    print(visited[K])
else:
    visited = visited[first_roop_city_index:]
    L = len(visited)
    print(visited[(K-first_roop_city_index)%L])

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
A = list(map(int,input().split()))
visited = []
search = set()
now = 1#最初の街にいる
count = 0
next_town = A[now-1]
while(count<=N):
    if next_town in search:#もし次の街が訪れたことがある場合
        break#ループするので抜け出す
    visited.append(now)#今いる街は訪れたこととなるので記録する
    search.add(now)
    next_town = A[now-1]#次に行く街を探す
    now = next_town#次の街に着いたこととして変数を代入
    count += 1

first_roop_city = A[visited[-1]-1]#最初にループした街
first_roop_city_index = visited.index(first_roop_city)#何回目のテレポートにループが始まったか
if K <= len(visited):
    print(visited[K])
else:
    visited = visited[first_roop_city_index:]
    L = len(visited)
    print(visited[(K-first_roop_city_index)%L])
Problem p02690 (python)

Fixed submission:
X = int(input())
li = [i**5 for i in range(0,10000,1)]
for A in li:
    if A-X in li:#Bが自然数
        B = li.index(A-X)
        break
    elif A-X < 0:#Bが負の実数
        if abs(A-X) in li:
            B = (li.index((A-X)*(-1))) * (-1)
            break

print(li.index(A),B)

Buggy submission (verdict: Runtime Error):
X = int(input())
li = [i**5 for i in range(0,100,1)]
for A in li:
    if A-X in li:#Bが自然数
        B = li.index(A-X)
        break
    elif A-X < 0:#Bが負の実数
        if abs(A-X) in li:
            B = (li.index((A-X)*(-1))) * (-1)
            break

print(li.index(A),B)

Buggy submission (verdict: Runtime Error):
X = int(input())
li = [i**5 for i in range(0,65,1)]
for A in li:
    if A-X in li:#Bが自然数
        B = li.index(A-X)
        break
    elif A-X < 0:#Bが負の実数
        if abs(A-X) in li:
            B = (li.index((A-X)*(-1))) * (-1)
            break

print(li.index(A),B)

Buggy submission (verdict: Runtime Error):
X = int(input())
li = [i**5 for i in range(0,40,1)]
for A in li:
    if A-X in li:#Bが自然数
        B = li.index(A-X)
        break
    elif A-X < 0:#Bが負の実数
        if abs(A-X) in li:
            B = (li.index((A-X)*(-1))) * (-1)
            break

print(li.index(A),B)
Problem p02983 (python)

Fixed submission:
L,R = map(int,input().split())
r = min(R,L+4038)
ans = 2018
for i in range(L,r+1,1):
    for j in range(i+1,r+1):
        tmp = (i*j)%2019
        ans = min(tmp,ans)
print(ans)

Buggy submission (verdict: Runtime Error):
L,R = map(int,input().split())
mod = 2019
if R-L==1:
    print((L*R)%mod)
    exit()
li = [i%mod for i in range(L,R+2019)]
li.sort()
if li[0]==0:
    print(li[1]*li[2])
else:
    print(li[0*li[1])
Problem p03000 (python)

Fixed submission:
N, X = map(int,input().split())
L = list(map(int,input().split()))
count = 1
now = 0
for i in range(N):
    if now+L[i]>X:
        break
    else:
        now += L[i]
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N, X = map(int,input().split())
L = list(map(int,input().split()))
count = 1
now = 0
for i in range(N+1):
    if now+L[i]>X:
        break
    else:
        now += L[i]
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N, X = map(int,input().split())
L = list(map(int,input().split()))
count = 0
tmp = 0
i = 0
while(tmp<=X):
    tmp += L[i]
    count += 1
    i += 1
print(count)
Problem p03043 (python)

Fixed submission:
N, K = map(int,input().split())
ans = 0.0
for i in range(1,N+1,1):
    count = 0
    tmp = i
    if tmp < K:
        while True:
            tmp *= 2
            count += 1
            if tmp>=K:
                break
    ans += float(1/N)*(0.5**count)
print(ans)

Buggy submission (verdict: Runtime Error):
    N, K = map(int,input().split())
    ans = 0.0
    for i in range(1,N+1,1):
        count = 0
        tmp = i
        if tmp < K:
            while True:
                tmp *= 2
                count += 1
                if tmp>K:
                    break
    ans += float(1/N)*(0.5**count)
    print(ans)
Problem p03076 (python)

Fixed submission:
li = [str(input()) for i in range(5)]
tmp = []
tmp_2 = []
s = 0
for i in range(5):
    if 10-int(li[i][-1]) != 10:
        tmp.append(10-int(li[i][-1]))
    tmp_2.append(int(li[i]))
tmp.sort()
if len(tmp) != 0:
    print(sum(tmp_2)+(sum(tmp)-tmp[-1]))
else:
    print(sum(tmp_2))

Buggy submission (verdict: Runtime Error):
li = [str(input()) for i in range(5)]
tmp = []
tmp_2 = []
s = 0
for i in range(5):
    if 10-int(li[i][-1]) != 10:
        tmp.append(10-int(li[i][-1]))
    tmp_2.append(int(li[i]))
tmp.sort()
print(sum(tmp_2)+(sum(tmp)-tmp[-1]))
Problem p03219 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = list(map(int,input().split())
print(a+b//2)
Problem p03244 (python)

Fixed submission:
from collections import Counter
N = int(input())
V = list(map(int, input().split()))
a = Counter(V[0::2]).most_common() + [(0,0)]
b = Counter(V[1::2]).most_common() + [(0,0)]
if a[0][0]!=b[0][0]:
    print(N-a[0][1]-b[0][1])
else:
    print(N-max(a[1][1]+b[0][1],a[0][1]+b[1][1]))

Buggy submission (verdict: Runtime Error):
import collections
n = int(input())
v = list(map(int,input().split()))
ans = 0
lia = v[::2]
lib = v[1::2]
tmp1 = len(lia)
tmp2 = len(lib)
lia.sort()
lib.sort()
if lia[0]==lib[-1]:
  print(n//2)
  exit()
lib.sort(reverse=True)
lia = collections.Counter(lia)
lib = collections.Counter(lib)
ans += tmp1-lia.most_common()[0][1]
ans += tmp2-lib.most_common()[0][1]
if lia.most_common()[0][1]%2==1 and lib.most_common()[0][1]2==1:
  print(ans+1)
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
v = list(map(int,input().split()))
li = [0]*(10**5)
for i in range(n):
  li[v[i]] += 1
li.sort(reverse=True)
tmp = li[0]+li[1]
if tmp==n and li[0]!=li[1]:
  print(n//2)
else:
  print(n-tmp)
Problem p03261 (python)

Fixed submission:
N = int(input())
W = [input() for _ in range(N)]
flag = True
b = W[0][-1]
for i in range(1,N): 
  if b == W[i][0]:
    b = W[i][-1]
  else:
    flag = False
    break
    
if int(len(W))!=len(set(W)):
  flag = False

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

Buggy submission (verdict: Runtime Error):
N = int(input())
W = [input() for _ in range(N)]
flag = True 
b = W[0][-1] 
for i in range(1,N): 
  if b == W[i][0]:　
    b = W[i][-1]　
  else: 
    flag = False
    exit()
    
if int(len(W))!=len(set(W)):
  flag = False

if flag == True:
  print("Yes")
else:
  print("No")
Problem p03281 (python)

Fixed submission:
n = int(input())
count = 0
for i in range(105,n+1,2):
  x = 0
  for j in range(1,i+1):
    if i%j==0:
      x+=1
  if x == 8:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
count = 0
for i in range(105,n+1,2):
  x = 0
  for j in range(1,i+1):
    if i%j==0:
      c+=1
  if x == 8:
    count += 1
print(count)
Problem p03282 (python)

Fixed submission:
S = str(input())
k = int(input())
for i in range(k):
    if S[i] != "1":
        print(S[i])
        exit()
print("1")

Buggy submission (verdict: Runtime Error):
S = str(input())
k = int(input())
if len(S) == 1:
    print(S)
    exit()
for i in range(10):
    if S[i] == "1" and int(S[i]) == k:
        print("1")
        break
    elif S[i] != "1":
        print(S[i])
        break

Buggy submission (verdict: Runtime Error):
S = str(input())
k = int(input())
if len(S) == 1:
    print(S)
    exit()
for i in range(10):
    if S[i] == "1" and int(S[i]) == k:
        print("1")
    elif S[i] != "1":
        print(S[i])
        break
Problem p03292 (python)

Fixed submission:
A = list(map(int,input().split()))
A.sort()
print(A[2]-A[0])

Buggy submission (verdict: Runtime Error):
A,B,C = list(map(int,input().split()))
list.sort()
print(list[2]-list[0])
Problem p03324 (python)

Fixed submission:
D, N = map(int,input().split())
if N == 100:
    print((100**D)*(N+1))
else:
    print((100**D)*N)

Buggy submission (verdict: Runtime Error):
D, N = map(int,input().split())
if N <= 99:
    print((100*D)*N)
else:
    print((100**D)*(N+1)))
Problem p03427 (python)

Fixed submission:
N = str(input())
K = len(N)
c = int(N[0])
for i in N[1:]:
    if i!="9":
        print(c+9*(K-1)-1)
        exit()
print(c+9*(K-1))

Buggy submission (verdict: Runtime Error):
N = str(input())
count = 0
new_n = ""

for i in range(len(N)):
    if N[i]!="9" and i==len(N)-1:
        new_n = str(int(N)-int(N[-1])-1)
        break
    elif N[i]!="9":
        new_n = str((int(N[i]) * 10**(len(N)-i-1)) -1)
        break

for j in new_n:
    count += int(j)

print(count)
Problem p03456 (python)

Fixed submission:
a,b = input().split()
c = 0
n = 0
flag = False
c = a*(1**len(b))+b
for i in range(100000):
  n += 1
  if int(n*n) == int(c):
    flag = True
    break
if flag == True:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b = input().split()
c = 0
n = 0
flag = False
c = a*(1**len(b))+b
for i in range(100000):
  n += 1
  if int(n*n) == int(c):
    flag = True
    break
if flag == True:
  pritn("Yes")
else:
  print("No")
Problem p03611 (python)

Fixed submission:
import collections
N =  int(input())
a = list(map(int,input().split()))
a = collections.Counter(a)
a = sorted(a.items())
li = [0]*N
tmp = 0
if len(a)==1:
    print(a[0][1])
    exit()

for i in range(len(a)-1):
    tmp += a[i][1]
    if a[i][0]-1==a[i-1][0]:
        tmp += a[i-1][1]
    if a[i][0]+1==a[i+1][0]:
        tmp += a[i+1][1]
    li[i] = tmp
    tmp = 0

if a[-1][0]-1==a[-2][0]:
    li.append(a[-1][1]+a[-2][1])
print(max(li))

Buggy submission (verdict: Runtime Error):
import collections
N =  int(input())
a = list(map(int,input().split()))
a = collections.Counter(a)
a = sorted(a.items())
li = [0]*N
tmp = 0
if N==1:
    print(1)
    exit()

for i in range(len(a)-1):
    tmp += a[i][1]
    if a[i][0]-1==a[i-1][0]:
        tmp += a[i-1][1]
    if a[i][0]+1==a[i+1][0]:
        tmp += a[i+1][1]
    li[i] = tmp
    tmp = 0

if a[-1][0]-1==a[-2][0]:
    li.append(a[-1][1]+a[-2][1])
print(max(li))

Buggy submission (verdict: Runtime Error):
import collections
N =  int(input())
a = list(map(int,input().split()))
a = collections.Counter(a)
a = sorted(a.items())
li = [0]*N
tmp = 0
if N==1:
    print(1)
    exit()

for i in range(len(a)-1):
    tmp += a[i][1]
    if a[i][0]-1==a[i-1][0]:
        tmp += a[i-1][1]
    if a[i][0]+1==a[i+1][0]:
        tmp += a[i+1][1]
    li[i] = tmp
    tmp = 0
if a[-1][0]-1==a[-2][0]:
    li[-1] = a[-1][1]+a[-2][1]
print(max(li))
Problem p03612 (python)

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

now = count = 0
while(now<N):
    if p[now]==now+1:
        if now+1 != N:
            tmp = p[now]
            p[now] = p[now+1]
            p[now+1] = tmp
            now -= 1
            count += 1
            continue
        else:
            tmp = p[now]
            p[now] = p[now-1]
            p[now-1] = tmp
            now -= 1
            count += 1
            continue
    now += 1
print(count)

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

now = count = 0
while(now<N):
    if p[now]==now+1:
        tmp = p[now]
        p[now] = p[now+1]
        p[now+1] = tmp
        now -= 1
        count += 1
        continue
    now += 1
print(count)
Problem p03624 (python)

Fixed submission:
S = list(set(input()))
S.sort()
tmp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,len(tmp),1):
    if tmp[i] not in S:
        print(tmp[i])
        exit()
print("None")

Buggy submission (verdict: Runtime Error):
S = list(set(input()))
S.sort()
flag = False
tmp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,len(tmp),1):
    if str(S[i]) != str(tmp[i]):
        print(tmp[i])
        break
if flag != False:
    print("None")

Buggy submission (verdict: Runtime Error):
S = list(input())
li = list(set(S))
li.sort()
ascii_lowercase = list("abcdefghijklmnopqrstuvwxyz")
for i in range(0,len(S),1):
  if li[i] != ascii_lowercase[i]:
    print(ascii_lowercase[i])
    break
  elif li == ascii_lowercase:
    print("None")
    break

Buggy submission (verdict: Runtime Error):
S = input()
li = [i for i in S]
li_2 = list(set(li))
li_2.sort()
ascii_lowercase = "abcdefghijklmnopqrstuvwxyz"
ascii_lowercase_list = list(ascii_lowercase)
for k in range(0,len(S),1):
  if li_2[k] != ascii_lowercase_list[k]:
    print(ascii_lowercase_list[k])
    break
  elif li_2 == ascii_lowercase_list:
    print("None")
    break

Buggy submission (verdict: Runtime Error):
S = str(input())
li = [i for i in S]
li_2 = list(set(li))
li_2.sort()
ascii_lowercase = "abcdefghijklmnopqrstuvwxyz"
ascii_lowercase_list = list(ascii_lowercase)
for k in range(0,len(S),1):
  if li_2[k] != ascii_lowercase_list[k]:
    print(ascii_lowercase_list[k])
    break
  elif li_2 == ascii_lowercase_list:
    print("None")
    break

Buggy submission (verdict: Runtime Error):
S = str(input())
li = [i for i in S]
li_2 = list(set(li))
li_2.sort()
ascii_lowercase = "abcdefghijklmnopqrstuvwxyz"
ascii_lowercase_list = list(ascii_lowercase)
for k in range(0,len(S),1):
  if li_2[k] != ascii_lowercase_list[k]:
    print(ascii_lowercase_list[k])
    break
  elif k == len(S)-1:
    print("None")
    break

Buggy submission (verdict: Runtime Error):
S = str(input())
li = [i for i in S]
li_2 = list(set(li))
li_2.sort()
ascii_lowercase = "abcdefghijklmnopqrstuvwxyz"
ascii_lowercase_list = list(ascii_lowercase)
for i in range(0,len(S),1):
  if li_2[i] != ascii_lowercase_list[i]:
    print(ascii_lowercase_list[i])
    break
  elif i+1 == len(S):
    print("None")
    break
Problem p03693 (python)

Fixed submission:
r,g,b = map(int,input().split())
num = r*100+g*10+b
if (num%4==0):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
r,g,b = map(int,input().split())
num = r*100+g*10+b
if (num%4=0):
    print("YES")
else:
    print("NO")
Problem p03721 (python)

Fixed submission:
N, K = map(int,input().split())
li = []
count = 0
for i in range(N):
    a,b = map(int,input().split())
    li.append([a,b])
li.sort()
for j in range(N):
    count += li[j][1]
    if count >= K:
        print(li[j][0])
        break

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split())
count = 0
while True:
    a,b = map(int,input().split())
    count += b
    if count > K:
        print(a)
        exit()
Problem p03852 (python)

Fixed submission:
c = str(input())
if (c=="a" or c=="i" or c=="u" or c=="e" or c=="o"):
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
c = str(input()))
if (c=="a" or c=="i" or c=="u" or c=="e" or c=="o"):
  print("vowel")
else:
  print("consonant")
Problem p03861 (python)

Fixed submission:
a, b, x = map(int,input().split())
print((b//x)-(a-1)//x)

Buggy submission (verdict: Runtime Error):
a, b, x = map(int,input().split())
tmp = a
while True:
    if tmp % x == 0:
        break
    else:
        tmp += 1
print((b//tmp)-(a//tmp))