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

Fixed submission:
k,x = map(int,input().split())

print(" ".join(map(str,range(x-k+1,x+k))))

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

print(i for i in range(x+1-k,x+k))
Problem p02783 (python)

Fixed submission:
def main(Hitpoint,Attack):
  count_num = 0
  while True:
    Hitpoint -= Attack
    count_num += 1
    if Hitpoint <= 0:
      break
  return count_num
 
if __name__ == "__main__":
    inp=input().split()
    hitpoint = int(inp[0])
    attack = int(inp[1])
    print(main(hitpoint,attack))

Buggy submission (verdict: Runtime Error):
def main(Hitpoint,Attack):
  count_num = 0
  while true:
    Hitpoint -= Attack
    count_num += 1
    if Hitpoint <= 0:
      break

if __name__ == "__main__":
    inp=input()   
    main(inp.replace(' ', ','))
Problem p02789 (python)

Fixed submission:
def main(test_case,clear_case):
    if test_case <= clear_case:
      return "Yes"
    else:
      return "No"
    
if __name__ == "__main__":
    input_num = input()
    num1 = int(input_num.split()[0])
    num2 = int(input_num.split()[1])
    print(main(num1,num2))

Buggy submission (verdict: Runtime Error):
def main(length_num,num_list):
    count_num = 0
    for i in range(0,length_num):
        flag_tag = True
        for j in range(0 , i ):
          if int(num_list[i]) >= int(num_list[j]):
              flag_tag = False
              break
        if flag_tag != False:
            count_num += 1
    return count_num


    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(length_num,num_list))

Buggy submission (verdict: Runtime Error):
def main(test_case,clear_case):
    if test_case <= clear_case:
      return "Yes"
    else:
      return "No"
    
if __name__ == "__main__":
    input_num = input()
    int(num1) = input_num.split()[0]
    int(num2) = input_num.split()[1]
    print(main(num1,num2))
Problem p02791 (python)

Fixed submission:
def main(length_num,num_list):
    count_num = 0
    min_num = int(num_list[0])
    for i in num_list:
        if int(min_num) >= int(i):
            min_num = i
            count_num += 1           
    return count_num
    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(input_length_num,input_num_list))

Buggy submission (verdict: Runtime Error):
def main(length_num,num_list):
    count_num = 0
    for i in range(0,length_num):
        flag_tag = True
        for j in range(0 , i ):
          if int(num_list[i]) >= int(num_list[j]):
              print(num_list[i],num_list[j])
              flag_tag = False
              break
        if flag_tag != False:
            count_num += 1
    return count_num


    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(length_num,num_list))
Problem p02783 (python)

Fixed submission:
S = input()
H, A = S.split()
H = int(H)
A = int(A)
if H%A == 0:
  print(int(H/A))
else:
  print(int(H/A) + 1)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
H = list(map(int, input().split()))
if N <= K:
  print(0)
elif K == 0:
  print(sum(H))
else:
	H = sort(H)
	print(sum(H[:-K]))
Problem p02783 (python)

Fixed submission:
import math

h,a = map(int, input().split())
ans = math.ceil(h/a)

print(ans)

Buggy submission (verdict: Runtime Error):
import math

h = int(input())
a = int(input())

ans = math.ceil(h/a)

print(ans)
Problem p02783 (python)

Fixed submission:
import math
H,A=map(int, input().split())
print(math.ceil (H/A))

Buggy submission (verdict: Runtime Error):
import math
H=int(input ())
A=int (input())
print(math.ceil (H/A))
Problem p02801 (python)

Fixed submission:
C=input()
print (chr(ord(C)+1))

Buggy submission (verdict: Runtime Error):
N,K,M=list(map(int,input().split()))
listA=list(map(int,input().split()))
S=sum(listA)
if S>=M*N-K and S<N*M:
  print(M*N-S)
elif S>=M*N:
    print(0)
else:
    print(-1)
Problem p02811 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
count=0
for i in range(N):
    if (S[i:i+3]=="ABC"):
        count=count+1
print(count)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if(a * 500 >= b){
  print("Yes")
} else {
  print("No")
}
Problem p02848 (python)

Fixed submission:
N=int(input())
S=input()
B=""
for i in range(len(S)):
   C=ord(S[i])+N
   if C>90:
       C=C-26
   else:
       C=C
   B=B+chr(C) 
print(B)

Buggy submission (verdict: Runtime Error):
N=int(input())
S,T=input().split()
A=[]
for s,t in  zip(S,T):
  A.append(s+t)
print(write(A))
Problem p02921 (python)

Fixed submission:
S=input()
T=input()
count=0
if S[0]==T[0]:
    count=count+1
if S[1]==T[1]:
    count=count+1
if S[2]==T[2]:
    count=count+1
print(count)

Buggy submission (verdict: Runtime Error):
=input()
T=input()
count=0
if S[0]==T[0]:
    count=count+1
if S[1]==T[1]:
    count=count+1
if S[2]==T[2]:
    count=count+1
print(count)
Problem p02958 (python)

Fixed submission:
N=int(input())
P=list(map(int,input().split()))
count=0
for i in range(N):
    if P[i]!=i+1:
        count=count+1
if count<3:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
=int(input())
P=list(map(int,input().split()))
count=0
if P[0]!=1:
    count=count+1
elif P[N-1
       ]!=N:
    count=count+1
for i in range(N-1):
    if P[i]+1!=P[i+1]:
        count=count+1
if count<5:
    print('YES')
else:
    print('NO')
Problem p02885 (python)

Fixed submission:
a, b = map(int, input().split())
ans = a - 2 * b
if ans < 0:
  ans = 0
print(ans)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input())
ans = a - 2 * b
if ans < 0:
  ans = 0
print(ans)
Problem p02902 (python)

Fixed submission:
# -*- Coding: utf-8 -*-
INF = 1001001001
n, m = map(int, input().split())

def bfs(sv, to_list):
  dist = [INF for i in range(n)]
  hist = [-1 for i in range(n)]
  q = []
  dist[sv] = 0
  q.append(sv)
  while len(q) > 0:
    v = q[0]
    del q[0]
    for j in to_list[v]:
      if dist[j] != INF:
        continue
      hist[j] = v
      dist[j] = dist[v] + 1
      q.append(j)
  min_cycle = INF
  min_hist = -1
  for i in range(n):
    if i == sv:
      continue
    for j in to[i]:
      if j == sv:
        if min_cycle > dist[j]:
          min_cycle = dist[i]
          min_hist = i
  res = []
  temp_v = min_hist
  if min_cycle < INF:
    while temp_v > -1:
      res.append(temp_v)
      temp_v = hist[temp_v]
  else:
    res = [1 for i in range(n+1)]
  return res
    

to = [[] for i in range(m)]
for i in range(m):
  a, b = map(int, input().split())
  to[a-1].append(b-1)
if len(to) == 0:
  print(-1)
else:  
  c = [bfs(i, to) for i in range(n)]
  ans = [1 for i in range(n+1)]
  for i in range(n):
    if len(ans) > len(c[i]):
      ans = c[i]
  if len(ans) == n + 1:
    print(-1)
  else:
    print(len(ans))
    for v in ans[::-1]:
      print(v+1)

Buggy submission (verdict: Runtime Error):
# -*- Coding: utf-8 -*-
INF = 1001001001
n, m = map(int, input().split())

def bfs(sv, to_list):
  dist = [INF for i in range(n)]
  hist = [-1 for i in range(n)]
  q = []
  dist[sv] = 0
  q.append(sv)
  while len(q) > 0:
    v = q[0]
    del q[0]
    for j in to_list[v]:
      if dist[j] != INF:
        continue
      hist[j] = v
      dist[j] = dist[v] + 1
      q.append(j)
  min_cycle = INF
  min_hist = -1
  for i in range(n):
    if i == sv:
      continue
    for j in to[i]:
      if j == sv:
        if min_cycle > dist[j]:
          min_cycle = dist[i]
          min_hist = i
  res = []
  temp_v = min_hist
  if min_cycle < INF:
    while temp_v > -1:
      res.append(temp_v)
      temp_v = hist[temp_v]
  else:
    res = [1 for i in range(n+1)]
  return res
    

to = [[] for i in range(m)]
for i in range(m):
  a, b = map(int, input().split())
  to[a-1].append(b-1)
c = [bfs(i, to) for i in range(n)]
ans = [1 for i in range(n+1)]
for i in range(n):
  if len(ans) > len(c[i]):
    ans = c[i]
if len(ans) == n + 1:
  print(-1)
else:
  print(len(ans))
  for v in ans[::-1]:
    print(v+1)
Problem p02983 (python)

Fixed submission:
l, r = map(int, input().split())
m = []
if l == r:
  print(l%2019 * l%2019)
else:
  if r - l < 2019:
    for i in range(l, r+1):
      m.append(i%2019)
    ans = 2019
    for i in range(len(m)-1):
      for j in range(i+1, len(m)):
        temp = (m[i]*m[j])%2019
        if ans > temp:
          ans = temp
    print(ans)
  else:
    print(0)

Buggy submission (verdict: Runtime Error):
l, r = map(int, input().split())
m = []
if l == r:
  print(l%2019 * l%2019)
else:
  if r - l < 2019:
    for i in range(l, r+1):
      m.append(i%2019)
  else:
    for i in range(l, l+2020):
      m.append(i%2019)
  m = sorted(m)
  print(
Problem p03061 (python)

Fixed submission:
def gcd(a, b):
  if a%b == 0:
    return b
  else:
    return gcd(b, a%b)
def mgcd(l):
  if len(l) == 1:
    return l[0]
  else:
    new_l = []
    for i in range(-(-len(l)//2)):
      temp = gcd(l[i], l[-i-1])
      if temp == 1:
        return 1
      else:
        new_l.append(temp)
    return mgcd(new_l)

n = int(input())
a = list(map(int, input().split()))
a.sort()
ans1 = mgcd(a[1:])
min_gcd = 1001001001
min_idx = 0
for i in range(1,n):
  temp = gcd(a[0], a[i])
  if temp < min_gcd:
    min_gcd = temp
    min_idx = i
a.pop(min_idx)
ans2 = mgcd(a)
print(max(ans1, ans2))

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
  if a%b == 0:
    return b
  else:
    return gcd(b, a%b)
def multi_gcd(l):
  l = sorted(l, reverse=True)
  if len(l) == 1:
    return l[0]
  else:
    new_l = []
    if len(l)%2 == 0:
      for i in range(len(l)//2):
        temp_gcd = gcd(l[2*i], l[2*i+1])
        if temp_gcd == 1:
          return 1
        else:
          if temp_gcd not in new_l:
            new_l.append(temp_gcd)
      return multi_gcd(new_l)
    else:
      for i in range(len(l)//2):
        temp_gcd = gcd(l[2*i], l[2*i+1])
        if temp_gcd == 1:
          return 1
        else:
          if temp_gcd not in new_l:
            new_l.append()
      new_l.append(l[-1])
      return multi_gcd(new_l)
     
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
  a_gcd = multi_gcd(a[:i]+a[i+1:])
  if ans < a_gcd:
    ans = a_gcd
print(ans)
Problem p03076 (python)

Fixed submission:
import math
t = []
for i in range(5):
  t.append(int(input()))
ct = [math.ceil(x/10)*10 for x in t]
fraction = [x%10 for x in t]
fraction = list(filter(lambda x: x > 0, fraction))
if len(fraction) > 0:
  min_fraction = min(fraction)
else:
  min_fraction = 10
print(sum(ct) - 10 + min_fraction)

Buggy submission (verdict: Runtime Error):
import math
t = []
for i in range(5):
  t.append(int(input()))
ct = [math.ceil(x/10)*10 for x in t]
fraction = [x%10 for x in t]
min_fraction = min(list(filter(lambda x: x > 0, fraction)))
print(sum(ct) - 10 + min_fraction)
Problem p03110 (python)

Fixed submission:
n = int(input())
ans = 0
btcjpy = 380000
for i in range(n):
  x, u = input().split()
  if u == 'BTC':
    ans += btcjpy * float(x)
  else:
    ans += float(x)
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 0
btcjpy = 380000
for i in range(n):
  x, u = input().split()
  if u == 'BTC':
    ans += btcjpy * int(x)
  else:
    ans += int(x)
print(ans)
Problem p03238 (python)

Fixed submission:
n = int(input())
if n == 1:
  print('Hello World')
else:
  a = int(input())
  b = int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n = 1:
  print('Hello World')
else:
  a = int(input())
  b = int(input())
  print(a+b)
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):
a ,b =map(int,input().split())

if (a*b)%2 ==0:
    print("Even")
else:
    print("Odd)
Problem p02783 (python)

Fixed submission:
import math

h, a = input().split()
print(math.ceil(int(h)/int(a)))

Buggy submission (verdict: Runtime Error):
h, a = input().split()
print(int(h/a) + 1)

Buggy submission (verdict: Runtime Error):
h, a = input()
print(int(h)/int(a) + 1)

Buggy submission (verdict: Runtime Error):
h, a = input()
print(int(h/a) + 1)
Problem p02784 (python)

Fixed submission:
import math
 
h, n = map(int, input().split())
a = map(int, input().split())
if h - sum(a) > 0:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
    import math

    h, n = map(int, input().split())
    a = map(int, input().split())
    if h - sum(a) > 0:
        print("No")
    else:
        print("Yes")
Problem p03283 (python)

Fixed submission:
import numpy as np

n, m, q = map(int, input().split())

mat = np.zeros((n, n), dtype=int)

for _ in range(m):
    l, r = map(int, input().split())
    mat[l-1][r-1] += 1

ans = np.cumsum(np.cumsum(mat, axis=1)[::-1], axis=0)[::-1]

for _ in range(q):
    l, r = map(int, input().split())
    print(ans[l-1][r-1])

Buggy submission (verdict: Runtime Error):
import numpy as np

n, m, q = map(int, input().split())

mat = np.zeros((n, n), dtype=int)

for _ in range(m):
    l, r = map(int, input().split())
    mat[l-1][r-1] += 1

ans = np.cumsum(mat, axis=1)[::-1], axis=0)[::-1]

for _ in range(q):
    l, r = map(int, input().split())
    print(ans[l-1][r-1])
Problem p03339 (python)

Fixed submission:
s = ["", ""]

s[0] = input()
s[1] = input()

WtoE = []
wtoec = 0
EtoW = []
etowc = 0

for c in s[1]:
    if c == "W":
        wtoec = wtoec + 1
    WtoE.append(wtoec)

for c in s[1][::-1]:
    if c == "E":
        etowc = etowc + 1
    EtoW.append(etowc)
EtoW.reverse()

a = []
for i in range(0, int(s[0])):
    ans = WtoE[i] + EtoW[i]
    if WtoE[i] != 0 and s[1][i] == "W" or EtoW[i] != 0 and s[1][i] == "E":
        ans = ans - 1

    a.append(ans)

print(min(a))

Buggy submission (verdict: Runtime Error):
s = input().split()

WtoE = []
wtoec = 0
EtoW = []
etowc = 0

for c in s[1]:
    if c == "W":
        wtoec = wtoec + 1
    WtoE.append(wtoec)

for c in s[1][::-1]:
    if c == "E":
        etowc = etowc + 1
    EtoW.append(etowc)
EtoW.reverse()
print(WtoE)
print(EtoW)

a = []
for i in range(0, int(s[0])):
    ans = WtoE[i] + EtoW[i]
    if WtoE[i] != 0 and s[1][i] == "W" or EtoW[i] != 0 and s[1][i] == "E":
        ans = ans - 1

    a.append(ans)

print(min(a))
Problem p02783 (python)

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

if i[0] == i[1]:
    print("1")
elif i[0] % i[1] > 0:
    print((i[0] // i[1]) + 1)
else :
    print(i[0] // i[1])

Buggy submission (verdict: Runtime Error):
H = int(input("モンスターの体力を入力してください")) 
A = int(input("サーバルの攻撃力を入力してください"))
i = 0
while H > 0:
    H -=A
    i += 1
    print("モンスターの体力は", end="")
    print(H, end="")
    print("です。")
    
print("よって",end = "")
print(i, end = "")
print("回の攻撃でモンスターに勝つことができます")
Problem p02818 (python)

Fixed submission:
A, B, K = map(int, input().split())
if A <= K:
	a = 0
	if B <= K - A:
		b = 0
	else:
		b = B - (K - A)
else:
	a = A - K
	b = B
print(a, b)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
if A <= K:
	a = 0
	if B <= K - A:
		b = 0
	else:
		b = B - (K - A)
else:
	a = A - K
print(a, b)
Problem p02823 (python)

Fixed submission:
N, A, B = map(int, input().split())
ans = 0
if (B - A) % 2 == 0:
	ans = (B - A) // 2
else:
	if N - A >= B - 1:
		dis = A - 1 + 1
		ans = dis + ((B-dis) - 1) //2
		
		
	else:
		
		dis = N - B + 1
		ans = dis + (N - (A+dis)) //2

print(ans)

Buggy submission (verdict: Runtime Error):
N, M, V, P = map(int, input().split())
pre = list(map(int, input().split()))
li = sorted(pre)
total = M * V
tf = False
for i in range(N):
	if li[i] + M >= li[-P]:
		tmp = i+1 + P - 1
		nokori = total - (M * tmp)
		count = i + 1
		while count <= N - P:
			if nokori <= 0:
				ans = N-i
				tf = True
				break	
			sa = (li[i]+M) - li[count]
			if sa <= 1:
				count += 1
				continue
			nokori -= sa-1
			count += 1
		if tf == True:
			break
print(ans)
Problem p02848 (python)

Fixed submission:
N = int(input())
S = input()
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
sli = list(S)
for i in range(len(sli)):
  for j in range(26):
    if li[j] == sli[i]:
      sli[i] = li[j+N]
      break
print("".join(sli))

Buggy submission (verdict: Runtime Error):
S = input()
N = int(input())
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
sli = list(S)
for i in range(len(sli)):
  for j in range(26):
    if li[j] == sli[i]:
      sli[i] == li[j+N]
print("".join(sli))

Buggy submission (verdict: Runtime Error):
S = input()
N = input()
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
sli = list(S)
for i in range(len(sli)):
  for j in range(26):
    if li[j] == sli[i]:
      sli[i] == li[j+2]
print("".join(sli)
Problem p02887 (python)

Fixed submission:
N = int(input())
S = list(input())
li = list()
for i in range(N):
    if i < N-1:
        if S[i] != S[i+1]:
            li.append(S[i])
    else:
        li.append(S[i])
print(len(li))

Buggy submission (verdict: Runtime Error):
N = int(input())
li = list(map(int, input().split()))
ans = dict()
for i in range(len(li)):
    ans[li[i]] = i + 1
ali = []
for j in sorted(ans.keys()):
    ali.append(ans[j])
print(*join(ali))
Problem p02899 (python)

Fixed submission:
N = int(input())
li = list(map(int, input().split()))
ans = dict()
for i in range(len(li)):
    ans[li[i]] = i + 1
ali = []
for j in sorted(ans.keys()):
    ali.append(ans[j])
print(*ali)

Buggy submission (verdict: Runtime Error):
N = int(input())
li = list(map(int, input().split()))
ans = dict()
for i in range(len(li)):
    ans[li[i]] = i + 1
ali = []
for j in sorted(ans.keys()):
    ali.append(ans[j])
print(*join(ali))

Buggy submission (verdict: Runtime Error):
N = int(input())
li = list(map(int, input().split()))
ans = dict()
for i in range(len(li)):
    ans[li[i]] = i + 1
ali = []
for j in sorted(ans.keys()):
    ali.append(ans[j])
print(ali.split())
Problem p02947 (python)

Fixed submission:
import collections
N = int(input())
li = [input() for x in range(N)]
ans = 0
di = dict()
for k in li:
    word = ''.join(sorted(list(k)))
    if word in di.keys():
        ans += di[word]
        di[word] += 1
    else:
        di[word] = 1
print(ans)

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
li = [input() for x in range(N)]
ans = 0
di = dict()
for k in li:
    word = sorted(list(k))
    if word in di.keys():
        ans += di[word]
        di[word] += 1
    else:
        di[word] = 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
li = [input() for x in range(N)]
ans = 0
wli = list()
for k in li:
    wli.append(sorted(list(k))
for i in range(N):
    word = wli[i]
    for j in range(i+1, N):
        comp = wli[j]
        if word == comp:
            ans += 1
print(ans)
Problem p02952 (python)

Fixed submission:
N = int(input())
ans = 0
for i in range(1, N+1):
  if len(list(str(i))) % 2 == 1:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(1, N+1):
  if len(list(i)) % 2 = 1:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in N:
  if len(list(i)) % 2 == 1:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in N:
  if len(list(i)) % 2 = 1:
    ans += 1
print(ans)
Problem p02953 (python)

Fixed submission:
N = int(input())
li = list(map(int, input().split()))
ans = "Yes"
count = N - 1
while count >= 1:
    if li[count] - li[count-1] >= 0:
        pass
    elif li[count] - li[count-1] == -1:
        li[count-1] -= 1
    else:
        ans = "No"
        break
    count -= 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
li = list(map(int, input().split()))
ans = "Yes"
count = N - 1
while count >= 0:
    if li[count] - li[count-1] => 0:
        pass
    elif li[count] - li[count-1] == -1:
        li[count-1] -= 1
    else:
        ans = "No"
        break
    count -= 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
li = list(map(int, input().split()))
ans = "Yes"
count = N - 1
while count >= 0:
    if li[count] - li[count-1] => 0:
        pass
    elif li[count] - li[count-1] = -1:
        li[count-1] -= 1
    else:
        ans = "No"
        break
    count -= 1
print(ans)
Problem p02958 (python)

Fixed submission:
N = int(input())
li = list(map(int, input().split()))
ans = list()
for i in range(N):
  if i+1 != li[i]:
    ans.append('groot')
if len(ans) <= 2:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
N = int(input())
li = list(map(int, input().split()))
tmp = list()
ans = 'Yes'
for i in range(1, N):
    if li[i-1] > li[i]:
        tmp.append(li[i-1])
if len(tmp) != 2:
    ans == 'No'
else:
    t = li[tmp[0]]
    li[li.index(tmp[0])] = li[li.index(tmp[1])+1]
    li[li.index(tmp[1])+1] = t
    for i in range(N):
        if li[i-1] > li[i]:
            ans = 'No'
print(ans)
Problem p03029 (python)

Fixed submission:
a, p = map(int, input().split())
ans = (a*3+p) // 2
print(ans)

Buggy submission (verdict: Runtime Error):
a, p = input().split()
print((a*3 + p) // 2)

Buggy submission (verdict: Runtime Error):
a, p = input().split()
ptint((a*3 + p) // 2)
Problem p03434 (python)

Fixed submission:
N = int(input())
li = list(map(int, input().split()))
lili = sorted(li)
lili.reverse()
score = 0
isA = 1
for i in lili:
    if isA % 2 == 1:
        score += i
    else:
        score -= i
    isA += 1
print(score)

Buggy submission (verdict: Runtime Error):
N = int(input())
li = [int(input()) for x in range(N)]
lili = sorted(li)
lili.reverse()
score = 0
isA = 1
for i in lili:
    if isA % 2 == 1:
        score += i
    else:
        score -= i
    isA += 1
print(score)
Problem p03448 (python)

Fixed submission:
gohya =int(input())
hya = int(input())
goju = int(input())
total = int(input())
count = 0
for gh in range(gohya+1):
	for hy in range(hya+1):
		for gj in range(goju+1):
			if 500*gh + 100*hy + 50*gj == total:
				count += 1
print(count)

Buggy submission (verdict: Runtime Error):
gohya, hya, goju = map(int, input('500,100,50').split())
total = int(input('total'))
count = 0
for gh in range(gohya+1):
	for hy in range(hya+1):
		for gj in range(goju+1):
			if 500*gh + 100*hy + 50*gj == total:
				count += 1
print(count)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
input(a, b)
if (a*b)%2 == 1:
  print("Odd")
else:
  print("Even")

Buggy submission (verdict: Runtime Error):
a = None
b = None
if (a*b)%2 == 1:
  print("Odd")
else:
  print("Even")

Buggy submission (verdict: Runtime Error):
a = None
b = None
if (a*b)%2 == 1:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
if (a*b)%2 == 1:
  print("Even")
else:
  print("Odd")
Problem p03493 (python)

Fixed submission:
num = input()
counter = 0
li = list(num)
if li[0] == "1":
    counter += 1
if li[1] == "1":
    counter += 1
if li[2] == "1":
    counter += 1
print(counter)

Buggy submission (verdict: Runtime Error):
li = list(input())
counter = int(li[0) + int(li[1]) + int(li[2])
print(counter)

Buggy submission (verdict: Runtime Error):
li = list(input())
counter = int(li[0) + int(li[1]) + int(li[2])
print(counter)

Buggy submission (verdict: Runtime Error):
li = list(input())
counter = 0
for i in li:
    if li[i] == "1":
        counter += 1
print(counter)

Buggy submission (verdict: Runtime Error):
li = list(input())
counter = 0
for i in li:
    if li[i] == "1":
        counter += 1
print(counter)