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

Fixed submission:
# -*- coding: utf-8 -*-

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())#整数値　複数の入力
def S_MAP(): return map(str, input().split())#文字　複数の入力
def LIST(): return list(map(int, input().split()))#整数　複数の入力　配列
def S_LIST(): return list(map(str, input().split()))#文字　複数の入力　配列


x=S_LIST()


print(x.index("0")+1)

Buggy submission (verdict: Runtime Error):
import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict
 
x,y = map(int,input().split())
 
for i in range(1, x+1):
    # 足の数
    f = 2 * i + 4 * (x - i)
    if f == y:
        print('Yes')
        sys.exit()
    elif i==x: 
    	print('No')

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict


x=S_LIST()


print(x.index("0")+1)
Problem p02957 (python)

Fixed submission:
import statistics
import sys
import math
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()
 
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
    
A = MULT_INT_LIST()
mean = statistics.mean(A)
 
if is_integer_num(mean):
  print(int(mean))
else:
  print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
import statistics
import sys
import math
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()
 
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
    
A = MULT_INT_LIST()
mean = statistics.mean(A)
 
if is_integer_num(mean):
  print(int(mean))
else:
  print('IMPOSSIBLE')
 
 
import statistics
import sys
import math
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
    
A = MULT_INT_LIST()
mean = statistics.mean(A)

if is_integer_num(mean):
  print(int(mean))
else:
  print('IMPOSSIBLE')
Problem p02613 (python)

Fixed submission:
N=int(input())
test_case=[input() for _ in range(N)]
a=test_case.count('AC')
b=test_case.count('WA')
c=test_case.count('TLE')
d=test_case.count('RE')
print('AC x '+ str(a))
print('WA x '+ str(b))
print('TLE x '+str(c))
print('RE x '+str(d))

Buggy submission (verdict: Runtime Error):
N=int(input())
test_case=[input() for _ in range(N)]
a=test_case.count('AC')
b=test_case.count('WA')
c=test_case.count('TLE')
d=test_case.count('RE')
print('AC x '+a)
print('WA x '+b)
print('TLE x '+c)
print('RE x '+d)

Buggy submission (verdict: Runtime Error):
N=int(input())
test_case=[input() for_in range(N)]
a=test_case.count(''AC'')
b=test_case.count(''WA'')
c=test_case.count(''TLE'')
d=test_case.count(''RE'')
print('AC x '+a)
print('WA x '+b)
print('TLE x '+c)
print('RE x '+d)

Buggy submission (verdict: Runtime Error):
N=int(input())
test_case=[input() for_in range(N)]
a=test_case.count('AC')
b=test_case.count('WA')
c=test_case.count('TLE')
d=test_case.count('RE')
print('AC x '+ a)
print('WA x '+ b)
print('TLE x '+ c)
print('RE x '+ d)

Buggy submission (verdict: Runtime Error):
N=int(input())
test_case=[input() for_in range(N)]
a=test_case.count('AC')
b=test_case.count('WA')
c=test_case.count('TLE')
d=test_case.count('RE')
print('AC x '+a)
print('WA x '+b)
print('TLE x '+c)
print('RE x '+d)
Problem p03160 (python)

Fixed submission:
from math import inf

n = int(input())
h = list(map(int, input().split()))

costs = [inf]*n
costs[0] = 0

for i in range(n):
	for j in (i+1, i+2):
		if j < n:
			costs[j] = min(costs[j], costs[i]+abs(h[i]-h[j]))
print(costs[-1])

Buggy submission (verdict: Runtime Error):
from math import inf

n = int(input())
h = list(map(int, input().split()))

costs = [inf]*n
costs[0] = 0

for i in range(n):
	for j in (i+1, i+2):
		if j < n:
			costs[j] = min(costs[j], costs[i]+abs(h[i]-h[j]))
print(c[-1])
Problem p02612 (python)

Fixed submission:
n = int(input())
if n%1000==0:
    print(0)
else:
    print(1000-(n%1000))

Buggy submission (verdict: Runtime Error):
if int(input())%1000==0:
    print(0)
else:
    print(1000-((int(input()))%1000))
Problem p02621 (python)

Fixed submission:
a = int(input())
print(a+a**2+a**3)

Buggy submission (verdict: Runtime Error):
a = int(imput)
print(a(1+a(1+a)))

Buggy submission (verdict: Runtime Error):
a = int(input)
b = a**2
c = a**3
print(a+b+c)

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

print(a+a**2+a**3)
Problem p02882 (python)

Fixed submission:
import math

a, b, x = map(int, input().split())

t = a*a*b

if x == t:
    theta = 90
elif x <= t*0.5:
    tan = 2*x/(a*b*b)
    theta = math.degrees(math.atan(tan))
else:
    tan = a*a*a/(2*(a*a*b - x))
    theta = math.degrees(math.atan(tan))

print(90 - theta)

Buggy submission (verdict: Runtime Error):
import math

a, b, x = map(int, input().split())

t = a*a*b

if x <= t*0.5:
    tan = 2*x/(a*b*b)
    theta = math.degrees(math.atan(tan))
else:
    tan = a*a*a/(2*(a*a*b - x))
    theta = math.degrees(math.atan(tan))

print(90 - theta)
Problem p02664 (python)

Fixed submission:
t = input()
tt = t.replace("?", "D")
print(tt)

Buggy submission (verdict: Runtime Error):
t = input()
maxt = ""
if len(t) = 1:
  print("D")
else:
  while len(maxt) = len(t):
    if len(maxt) // 2 = 0:
      maxt += "P"
    else:
      maxt += "D"
  
  print(maxt)

Buggy submission (verdict: Runtime Error):
t = input()
lent = len(t)
maxt = ""
if lent = 1:
  print(D)
else:
  while len(maxt) = lent:
    if len(maxt) // 2 = 0:
      maxt + "P"
    else:
      maxt + "D"
  
  print(maxt)
Problem p02675 (python)

Fixed submission:
n = int(input()) % 10
if n == 3:
    print("bon")
elif n in {0, 1, 6, 8}:
    print("pon")
else:
    print("hon")

Buggy submission (verdict: Runtime Error):
enpitu = input("N ==:")
if enpitu <= 999:
	honsuu = enpitu // 10
	if honsuu == 3:
		print("bon")
	elif honsuu == 0, 1, 6, 8:
		print("pon")
	else:
		print("hon")
else:
    break

Buggy submission (verdict: Runtime Error):
enpitu = input("N ==:")
honsuu = enpitu // 10
if honsuu == 3:
	print("bon")
elif honsuu == 0, 1, 6, 8:
	print("pon")
else:
	print("hon")

Buggy submission (verdict: Runtime Error):
enpitu = input("":)
honsuu = enpitu // 10
if enpitu == 3:
	print("bon")
elif enpitu == 0, 1, 6, 8:
	print("pon")
else:
	print("hon")

Buggy submission (verdict: Runtime Error):
enpitu = input("N ==")
honsuu = enpitu // 10
if enpitu == 3:
	print("bon")
elif enpitu == 0, 1, 6, 8:
	print("pon")
else:
	print("hon")
Problem p02677 (python)

Fixed submission:
import math
a, b, h, m = map(int,input().split())
fine = math.radians(30 * h - 11 * m / 2)
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(fine))
print(c)

Buggy submission (verdict: Runtime Error):
import math
a, b, h, m = map(int,input().split())
fine = math.radians(30h - 11 * m / 2)
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(fine))
print(c)

Buggy submission (verdict: Runtime Error):
import math
a, b, h, m = map(int,input().split())
fine = math.radians(3 * (5h - m))
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(fine))
print(c)

Buggy submission (verdict: Runtime Error):
import math
a, b, h, m = map(int,input().split())
fine = math.cos((5h - m) * math.pi / 60)
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * fine)
print(c)

Buggy submission (verdict: Runtime Error):
import math
a, b, h, m = map(int,input().split)
fine = math.cos((5h - m) * math.pi / 60)
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * fine)
print(c)

Buggy submission (verdict: Runtime Error):
import math
a, b, h, m = map(int,input().split)
fine = math.cos((5h - m) * math.pi / 60)
c = sqrt(a ** 2 + b ** 2 - 2 * a * b * fine)
print(c)
Problem p02681 (python)

Fixed submission:
s = input()
t = input()
if s == t[:-1]:
	print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
if s = t[:-1]:
	print("Yes")
else:
    print("No")
Problem p02687 (python)

Fixed submission:
s = input()
if s == "ARC":
	print("ABC")
else:
    print("ARC")

Buggy submission (verdict: Runtime Error):
s = input()
if s == "ARC":
	print("ABC")
elif s == "ABC":
    print("ARC")
else:
    break
Problem p02700 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if ((aok - 1) * d - a) >= 0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if ((aok - 1) * d - a) => 0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if (aok - 1) * d - a => 0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if (aok - 1) * d - a => 0:
  print("NO")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if (int(aok) - 1) * d - a => 0:
  print("NO")
else:
  print("Yes")
Problem p02731 (python)

Fixed submission:
l = int(input())
e = l / 3
print(e*e*e)

Buggy submission (verdict: Runtime Error):
l = int(intput())
e = l / 3.0
print(e*e*e)

Buggy submission (verdict: Runtime Error):
l = float(intput())
e = l / 3.0
print(e*e*e)

Buggy submission (verdict: Runtime Error):
l = float(intput())
e = l // 3.0
print(e*e*e)
Problem p02801 (python)

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

Buggy submission (verdict: Runtime Error):
kamo,max,ave = map(int, input().split())
now = list(map(int, input().split()))
ten = 0
for i in now:
    ten += i

need = kamo * ave

if ( kamo * ave > ten + max):
    print(-1)
else:
    if(kamo * ave - ten >= 0):
        print(kamo * ave - ten)
    else:
        print(0)
Problem p02582 (python)

Fixed submission:
s = list(input())
box = []
cnt = 0
for i in s:
	if i == 'R':
		cnt += 1
	else:
		box.append(cnt)
		cnt = 0
box.append(cnt)
print(max(box))

Buggy submission (verdict: Runtime Error):
s = list(input())
box = []
cnt = 0
for i in s:
	if i == 'R':
		cnt += 1
	else:
		box.append(cnt)
print(max(box))
Problem p02640 (python)

Fixed submission:
import sys
x,y = map(int,input().split())
for i in range(x+1):
  for j in range(x-i+1):
    if i+j == x and (i*2)+(j*4) == y:
      print("Yes")
      sys.exit()
print("No")

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
crain = (4 * N - M) / 2
R = N - int(crain)
if crain.is_integer():
  if crain >= 0　and R > 0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
crain = (4 * N - M) / 2
if crain.is_integer():
  if crain >= 0　and (N - int(crain)) > 0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
crain = (4 * N - M) / 2
if crain.is_integer():
  if crain >= 0　and N - int(crain) > 0:
    print("Yes")
  else:
    print("No")
else:
  print("No")
Problem p02641 (python)

Fixed submission:
import sys
x,n = map(int,input().split())
l = list(map(int,input().split()))
not_l,ans = [],[]
if not x in l:
	print(x)
	sys.exit()
l = sorted(l)
for i in range(0,max(l)+3):
	if not i in l:
		not_l.append(i)
for j in range(len(not_l)):
	ans.append([not_l[j],abs(not_l[j]-x)])
ans.sort(key=lambda x:x[1])
print(ans[0][0])

Buggy submission (verdict: Runtime Error):
import sys
x,n = map(int,input().split())
l = list(map(int,input().split()))
not_l,ans = [],[]
if not x in l:
	print(x)
	sys.exit()
l = sorted(l)
for i in range(1,50):
	if not i in l:
		not_l.append(i)
for j in range(len(not_l)):
	ans.append([not_l[j],abs(not_l[j]-x)])
ans.sort(key=lambda x:x[1])
print(ans[0][0])

Buggy submission (verdict: Runtime Error):
import sys
x,n = map(int,input().split())
l = list(map(int,input().split()))
not_l,ans = [],[]
if not x in l:
	print(x)
	sys.exit()
l = sorted(l)
for i in range(1,101):
	if not i in l:
		not_l.append(i)
for j in range(len(not_l)):
	ans.append([not_l[j],abs(not_l[j]-x)])
ans.sort(key=lambda x:x[1])
print(ans[0][0])
Problem p02657 (python)

Fixed submission:
A = input().split()
print(int(A[0])*int(A[1]))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
#res = A[0]
for i in range(1,N): 
	A[0] *= A[i]
if A[0] <= 10**18:
	print(A[0])
else:
	print("-1")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
for i in range(1,N): 
	A[0] *= A[i]
if A[0] < 10**18:
	print(A[0])
else:
	print("-1")
Problem p02717 (python)

Fixed submission:
import sys
#readline = sys.stdin.readline()
A,B,C = map(int,input().split())
print(C,A,B)

Buggy submission (verdict: Runtime Error):
X,Y,Z = map(int,input().sp;split())
print(Z,X,Y)

Buggy submission (verdict: Runtime Error):
import sys
readline = sys.stdin.readline()
A,B,C = map(int,readline().split())
print(C,A,B)

Buggy submission (verdict: Runtime Error):
import sys
readllne = sys.stdin.readllne
A,B,C = map(int,readllne().split())
print(C,A,B)

Buggy submission (verdict: Runtime Error):
import sys
readllne = sys.stdin.readllne()
A,B,C = map(int,readllne().split())
print(C,A,B)
Problem p02760 (python)

Fixed submission:
import sys
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
N = int(input())
M = [int(input()) for i in range(N)]
for m in range(len(M)):
	if M[m] in A:
		A[A.index(M[m])] = 0
	elif M[m] in B:
		B[B.index(M[m])] = 0
	elif M[m] in C:
		C[C.index(M[m])] = 0
for t in range(3):
	if A[t] + B[t] + C[t] == 0:
		print('Yes')
		sys.exit()
if sum(A) == 0 or sum(B) == 0 or sum(C) ==0:
	print('Yes')
	sys.exit()
elif A[0] + B[1] + C[2] == 0:
	print('Yes')
	sys.exit()
elif A[2] + B[1] +C[0] == 0:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
N = int(input())
M = [int(input()) for i in range(N)]
for m in range(M):
	if M[m] in A:
		A[M[m]] = 0
	elif M[m] in B:
		B[M[m]] = 0
	elif M[m] in C:
		C[M[m]] = 0
for t in range(3):
	if A[t] + B[t] + C[t] == 0:
		print('Yes')
		sys.exit()
if sum(A) == 0 or sum(B) == 0 or sum(C) ==0:
	print('Yes')
	sys.exit()
elif A[0] + B[1] + C[2] == 0:
	print('Yes')
	sys.exit()
elif A[2] + B[1] +C[0] == 0:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
import sys
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
N = int(input())
M = [int(input()) for i in range(N)]

for m in range(M):
  if M[m] in A:
    A[M[m]] = 0
  elif M[m] in B:
    B[M[m]] = 0
  elif M[m] in C:
    C[M[m]] = 0

for t in range(3):
  if A[t] + B[t] + C[t] ==0:
    print("Yes")
    sys.exit()
if sum(A) == 0 or sum(B) == 0 or sum(C) ==0:
  print("Yes")
  sys.exit()
elif A[0] + B[1] + C[2] == 0:
  print("Yes")
  sys.exit()
elif A[2] + B[1] +C[0] == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import sys
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
N = int(input())
M = [int(input()) for i in range(N)]

for m in range(M):
  if M[m] in A:
    A[M[m]] = 0
  elif M[m] in B:
    B[M[m]] = 0
  elif M[m] in C:
    C[M[m]] = 0

for t in range(3):
  if A[t] + B[t] + C[t] ==0:
    print("Yes")
    sys.exit()
if sum(A) == 0 or sum(B) == 0 or sum(c) ==0:
  print("Yes")
  sys.exit()
elif A[0] + B[1] + C[2] == 0:
  print("Yes")
  sys.exit()
elif A[2] + B[1] +C[0] == 0:
  print("Yes")
else:
  print("No")
Problem p02765 (python)

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

print(R if N >= 10 else R + 100*(10-N))

Buggy submission (verdict: Runtime Error):
N,R = map(int,input().split())
print(R if N >= 10 else R+{100*(10-N)})

Buggy submission (verdict: Runtime Error):
N,R = map(int,input().split())
print(R if N >= 10 else R+{100*(10-K)})

Buggy submission (verdict: Runtime Error):
N,R = map(int,input().split())
print(R if N >= 10 else R+100*(10-K))
Problem p02772 (python)

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

#A内の奇数を0にする
for i in range(len(A)):
	if A[i]%2 != 0:
		A[i] = 0
#A内偶数をチェックする
for t in range(len(A)):
	if A[t] > 0:
		if A[t]%3 == 0 or A[t]%5 == 0:
			A[t] = 0
print("APPROVED" if sum(A) == 0  else "DENIED")

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

#A内の奇数を0にする
for i in range(len(A)):
  if A[i]%2 != 0:
    A.pop(A[i]) 
#A内偶数をチェックする
for t in range(len(A)):
  if A[i]%3 == 0 or A[i]%5 == 0:
    A_count +=1
print("APPROVED" if A_count == len(A) else "DENIED")
Problem p02789 (python)

Fixed submission:
N,M = map(int,input().split())
print("Yes" if N == M else "No")

Buggy submission (verdict: Runtime Error):
N,M = map(int,input(),split())
print("Yes" if N == M else "No")
Problem p02802 (python)

Fixed submission:
n,m = map(int,input().split())
p = [list(map(str,input().split())) for _ in range(m)]
ac =[0]*(n+1)
wa =[0]*(n+1)
for i in range(m):
    question =int(p[i][0])
    if p[i][1] == "AC" and ac[question] == 0:
        ac[question] = 1
    elif p[i][1] == "WA" and ac[question] == 0:
        wa[question] += 1
for j in range(n+1):
    if ac[j] == 0:
        wa[j] = 0
       # print(wa)
print(sum(ac),sum(wa))

Buggy submission (verdict: Runtime Error):
import sys
n,m = map(int,input().split())
p = [list(map(str,input().split())) for _ in range(m)]
box = []
acnt,wcnt,tmp = 0,0,0
if m == 0:
	print(0,0)
	sys.exit()
inx = 0
for i in range(m):
	if p[i][0] != inx
		if p[i][1] == 'AC':
				inx =p[i][0]
				acnt += 1
				wcnt += tmp
				tmp = 0
		else:
			tmp += 1
print(acnt,wcnt)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
p = [list(map(str,input().split())) for _ in range(m)]
box = []
acnt,wcnt,tmp = 0,0,0
inx = p[0][0]
for i in range(m):
	if not p[i][0] in box:
		if p[i][1] == 'AC':
				box.append(inx)
				acnt += 1
				wcnt += tmp
				tmp = 0
		else:
			tmp += 1
print(acnt,wcnt)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
p = [list(map(str,input().split())) for _ in range(m)]
box = []
acnt,wcnt,tmp = 0,0,0
inx = p[0][0]
for i in range(m):
		if p[i][1] == 'AC':
			if not p[i][0] in box:
				box.append(inx)
				acnt += 1
				wcnt += tmp
				tmp = 0
		else:
			tmp += 1
print(acnt,wcnt)
Problem p02848 (python)

Fixed submission:
Alp =["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]*2
N = int(input())
S = list(input())
for i in range(len(S)):
	Anum = Alp.index(S[i])
	S[i] = Alp[Anum+N]
print("".join(S))

Buggy submission (verdict: Runtime Error):
Alp =[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z]*2
N = int(input())
S = list(input())
for i in range(len(S)):
  Anum = Alp.index(S[i])
  S.replace(S[i],Alp[Anum+N])
print("".join(S))

Buggy submission (verdict: Runtime Error):
Alp =[A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z]*2
N = int(input())
S = list(input())
for i in range(len(S)):
	Anum = Alp.index(S[i])
    S.replace(S[i],Alp[Anum+N])
print("".join(S))
Problem p02898 (python)

Fixed submission:
N,K = map(int,input().split())
H = list(map(int,input().split()))
count = 0
for i in range(N):
  if H[i] >= K:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N、K = map(int,input().split())
H = list(map(int,input().split()))
count = 0
for i in range(N):
  if H[i] >= K:
    count += 1
print(count)

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

for i in range(N):
  if H[i] >= K:
    count += 1
    
print(count)
Problem p02909 (python)

Fixed submission:
wet = ["Sunny","Cloudy","Rainy"]
s = wet.index(input())
print(wet[s+1] if s != 2 else wet[0])

Buggy submission (verdict: Runtime Error):
wet = ["Sunny","Cloudy","Rainy"]
s = wet.index(input())
print(wet[s+1] if s != 2 else s[1])
Problem p02910 (python)

Fixed submission:
import sys
S = list(input())
S.insert(0,"X")

#文字列の奇数番目をチェック
for i in range(1,len(S),2):
  if S[i] == "L":
    print("No")
    sys.exit()
#文字列の偶数番目をチェック
for j in range(2,len(S),2):
  if S[j] == "R":
    print("No")
    sys.exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
import sys
S = list(input())
S.insert(0,"X")

for i in range(1,len(S)-1,2):
  if S[i] == "L":
    print("No")
    sys.exit()
for j in range(2,len(S)-1,2):
  if S[i] == "R":
    print("No")
    sys.exit()
print"Yes")
Problem p02922 (python)

Fixed submission:
import sys
A,B = map(int,input().split())
if B == 1:
  print(0)
  sys.exit()
  
for i in range(1,20):
  if (1+(A-1)*i) >= B:
    print(i)
    sys.exit()

Buggy submission (verdict: Runtime Error):
import sys
A,B = map(int,input(.split())
for i in range(1,20):
  if (1+(A-1)*i) >= B:
    print(i)
    sys.exit()
Problem p02923 (python)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
counter =[]
cnt = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    cnt += 1
  else:
    counter.append(cnt)
    cnt = 0
counter.append(cnt)
print(max(counter))

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
counter =[]
cnt = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    cnt += 1
  else:
    counter.append(cnt)
    cnt = 0
print(max(counter))
Problem p02924 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 0
if n <= 1000:
	for i in range(n):
		ans += i
else:
	for j in range(500500,n):
		ans += i
print(ans)
Problem p02945 (python)

Fixed submission:
A,B = map(int,input().split())
print(max(A+B,A-B,A*B))

Buggy submission (verdict: Runtime Error):
A,B = int(input())
print(max(A+B,A-B,A*B))
Problem p02946 (python)

Fixed submission:
k,x = map(int,input().split())
c =[]
for i in range(x-k+1,x+k):
  c.append(i)
print(' '.join(map(str,c)))

Buggy submission (verdict: Runtime Error):
k,x = map(int,input().split())
c =[]
for i in range(x-k,x+k):
  c.append(i)
print(" ".join(c))
Problem p02958 (python)

Fixed submission:
import copy
import sys
N = int(input())
H = list(map(int,input().split()))
C = 0

if sorted(H) == H:
	print("YES")
	sys.exit()

for i in range(0,N-1):
	for j in range(1,N):
		L = copy.copy(H)
		L[i],L[j] = L[j],L[i] 
		if L == sorted(H):
			print("YES")
			sys.exit()
print("NO")

Buggy submission (verdict: Runtime Error):
import sys
N = int(input())
H = list(map(int,input().split()))
C = 0

if sorted(H) == H:
  print("YES")
  sys.exit()
  
for i in range(0,N-1):
  for j in range(1,N):
    tmp = H.replace(H[i],H[j])
    if tmp == sorted(H):
      print("YES")
      sys.exit()
print("NO")
Problem p02994 (python)

Fixed submission:
N,L = map(int,input().split())
taste = []
tmp = []
for i in range(1,N+1):
	tmp.append(abs(L + i -1))
	taste.append((L + i -1))
num = tmp.index(min(tmp)) 
taste[num] = 0
print(sum(taste))

Buggy submission (verdict: Runtime Error):
N,L = map(int,input().split())
taste = tmp = []
for i in range(1,N):
  tmp.append(abs(L + i -1))
  taste.append((L + i -1))
num = tmp.index(min(tmp)) 
taste.index(num) = 0
print(sum(taste))