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

Fixed submission:
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Buggy submission (verdict: Runtime Error):
R = int(input())
if R < 1200:
    print('ABC')
elif:
    R < 2800:
    print('ARC')
else:
    print('AGC')
Problem p03289 (python)

Fixed submission:
S = input()
flg = 0
if S[0] == 'A':
    flg += 1
if S[1].isupper():
    flg += 1000
for i in range(2, len(S)-1):
    if S[i] == 'C':
        flg += 10
    elif S[i].isupper():
        flg += 1000
if S[-1].isupper():
    flg += 1000
if flg == 11:
    print('AC')
else:
    print('WA')

Buggy submission (verdict: Runtime Error):
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')
Problem p03778 (python)

Fixed submission:
W, a, b = map(int, input().split())
print(max(0, abs(a - b) - W))

Buggy submission (verdict: Runtime Error):
W, a, b = map(int, input().split())
print(max(0, abs(A - B) - W))
Problem p03779 (python)

Fixed submission:
X = int(input())
i = 0
sum = 0
while sum < X:
  i += 1
  sum += i
print(i)

Buggy submission (verdict: Runtime Error):
X = int(input())
i = 0
sum = 0
while sum < X:
  i += 1
  sum += i
 print(i)
Problem p03436 (python)

Fixed submission:
# https://atcoder.jp/contests/abc088/tasks/abc088_d

from collections import deque

def solve(R, C, sy, sx, gy, gx, mz):
  queue = deque()
  checked = set( )
  queue.append((sx, sy, 0))
  while queue:
    x, y, n = queue.popleft()
    if x == gx and y == gy:
      return n
    if x < 1 or x > C or y < 1 or y > R or mz[y-1][x-1] == '#':
      continue
    if (x, y) in checked:
      continue
    checked.add((x, y))
    queue.append((x+1, y, n+1))
    queue.append((x-1, y, n+1))
    queue.append((x, y+1, n+1))
    queue.append((x, y-1, n+1))
  return -1


if __name__ == '__main__':
  R, C = map(int, input().split(' '))
  sy, sx = 1, 1
  gy, gx = R, C
  mz = []
  whites = 0
  for r in range(R):
    tmp = input()
    mz.append(tmp)
    whites += tmp.count('.')
  n = solve(R, C, sy, sx, gy, gx, mz)
  if n < 0:
    print(-1)
  else:
    print(whites - n - 1)

Buggy submission (verdict: Runtime Error):
def read():
    H, W = map(int, input().split(' '))
    Ss = []
    for _ in range(H):
        Ss.append(input())
    return H, W, Ss

DIRS = [(-1, 0), (1, 0), (0, -1), (0, 1)]

def add(p1, p2):
    return (p1[0] + p2[0], p1[1] + p2[1])

def ans(H, W, Ss):
    if Ss[0][0] == '#':
        print('0,0 #')
        return -1
    ds =[ [-1 for _ in range(W)] for _ in range(H)]
    ds[0][0] = 1
    q = [(0, 0)]
    while q:
        p = q.pop()
        d = ds[p[1]][p[0]]
        for dr in DIRS:
            x, y = add(p, dr)
            if x < 0 or x >= W or y < 0 or y >= H:
                continue # 範囲外へは移動できない
            if Ss[y][x] == '#':
                continue # 行き止まりへは移動できない
            if ds[y][x] >= 0 and ds[y][x] < d + 1: # すでに訪れていて短縮にもなっていない
                continue
            ds[y][x] = d + 1
            q.append((x, y))
    if ds[H-1][W-1] < 0:
        return -1
    # 白マスを数える
    ws = sum([l.count('.') for l in Ss])
    return ws - ds[H-1][W-1]

if __name__ == '__main__':
	H, W, Ss = read()
    print(ans(H, W, Ss))

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc088/tasks/abc088_d

from collections import deque

def solve(R, C, sy, sx, gy, gx, mz):
  queue = deque()
  checked = set( )
  queue.append((sx, sy, 0))
  while queue:
    x, y, n = queue.popleft()
    if x == gx and y == gy:
      return n
    if x < 1 or x > C or y < 1 or y > R or mz[y-1][x-1] == '#':
      continue
    if (x, y) in checked:
      continue
    checked.add((x, y))
    queue.append((x+1, y, n+1))
    queue.append((x-1, y, n+1))
    queue.append((x, y+1, n+1))
    queue.append((x, y-1, n+1))
    


if __name__ == '__main__':
  R, C = map(int, input().split(' '))
  sy, sx = 1, 1
  gy, gx = R, C
  mz = []
  whites = 0
  for r in range(R):
    tmp = input()
    mz.append(tmp)
    whites += tmp.count('.')
  n = solve(R, C, sy, sx, gy, gx, mz)
  print(whites - n - 1)
Problem p02866 (python)

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

dd = sorted(d)
c = []
j = 0
for i in range(max(d)+1):
	tmp = 0
	while dd[j] == i:
		tmp += 1
		j += 1
		if j == n:
			break
	c.append(tmp)

ans = 1
if d[0] == 0 and d.count(0) == 1 and c.count(0) == 0:
	for i in range(1, max(d)):
		ans = ans * (c[i]**c[i+1])
else:
	ans = 0

print(ans%998244353)

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

d.sort()
c = [0]
j = 0
for i in range(1, max(d)):
	tmp = 0
	 while d[j] == i:
	 	tmp += 1
	 	j += 1
	 c.append(tmp)

ans = 1
if d[0] == 0 and d.count(0) == 1 and c.count(0) == 0:
	for i in range(1, max(d)):
		ans = ans * (c[i]**c[i+1])
else:
	ans = 0

print(ans%998244353)

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

for i in range(max(d)+1):
	x.append(d.count(i))
ans = 1
if d[0] == 0 and x[0] == 1:
	for i in range(1, len(x)):
		ans = ans * (x[i]**x[i+1])
else:
	ans = 0

print(ans%998244353)
Problem p02923 (python)

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

m = 0
ans  = [0]
while m <= n - 3:
	c = 0
	for i in range(m, n-1):
		if h[i] >= h[i+1]:
			c += 1
		else:
			break
	m = i + 1
	ans.append(c)


print(max(ans))

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

m = 0
ans  = []
while m <= n - 2:
	c = 0
	for i in range(m, n-1):
		if h[i] >= h[i+1]:
			c += 1
		else:
			break
	m = i + 1
	ans.append(c)


print(max(ans))

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

m = 0
ans  = []
while m < n - 2:
	c = 0
	for i in range(m, n-1):
		if h[i] >= h[i+1]:
			c += 1
		else:
			break
	m = i + 1
	ans.append(c)


print(max(ans))

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

m = 0
ans  = []
while m < n - 1:
	c = 0
	for i in range(m, n-1):
		if h[i] >= h[i+1]:
			c += 1
		else:
			break
	m = i + 1
	ans.append(c)


print(max(ans))
Problem p03434 (python)

Fixed submission:
n = int(input())
a = input()

a = a.split()


for i in range(n):
	a[i] = int(a[i])

a	= sorted(a)
a.reverse()

alice = a[0]
bob = 0
for i in range(1, n):
	if i%2 == 0:
		alice = alice + a[i]
	else:
		bob = bob + a[i]
	
print(alice - bob)

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

a = a.split()


for i in range(n):
	a[i] = int(a[i])
	
a = a.reverse()

alice = int(a[0])
bob = 0
for i in range(1, n):
	if i%2 == 0:
		alice = alice + int(a[i])
	else:
		bob = bob + int(a[i])
	
print(alice - bob)

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

a = a.split()

alice = 0
bob = 0
ans = 0

for i in range(n):
	a[i] = int(a[i])

a = a.reverse()

for i in range(n):
	if i%2 == 0:
		alice = alice + int(a[i])
	else:
		bob = bob + int(a[i])
	
print(alice - bob)
Problem p03455 (python)

Fixed submission:
ab = input()
ab = ab.split()

a = int(ab[0])
b = int(ab[1])



if a*b%2 == 0:
	print('Even')
else:
	print('Odd')

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


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

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

cli = []
for i in range(nk[0]+1):
	cli.append(0)

for i in range(nk[0]):
	cli[a[i]] += 1

c = sorted(cli, reverse = True)

m = 0
for i in range(nk[1]):
	m += c[i]

ans = nk[0] - m
if ans < 0:
	ans = 0
	
print(ans)

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


sa = list(set(a))

if len(sa) > nk[1]:
	c = []
	for i in range(len(sa)):
		c.append(a.count(sa[i]))
		
	sortc = sorted(c, reverse = True)
	for i in range(nk[1]):
		m += sc[i]
	ans = n - m
else:
	ans = 0

print(ans)
Problem p02582 (python)

Fixed submission:
S = input()
max_count = 0
counter = 0
for i in S:
  if i == 'S':
    if max_count < counter:
      max_count = counter
      counter = 0
  elif i == 'R':
    counter += 1

if max_count < counter:
  max_count = counter

print(max_count)

Buggy submission (verdict: Runtime Error):
S = input()
max_count = 0
counter = 0
for i in S:
  if i == 'S':
    if max_counter < counter:
      max_count = counter
      counter = 0
  elif i == 'R':
    counter += 1

if max_counter < counter:
  max_count = counter

print(max_counter)

Buggy submission (verdict: Runtime Error):
S = input()
counter = 0
for i in S:
  if i == 'S':
    counter = 0
  elif i == 'R':
    counter += 1

return counter

Buggy submission (verdict: Runtime Error):
counter = 0
for i in S:
  if i == 'S':
    counter = 0
  elif i == 'R':
    counter += 1

return counter

Buggy submission (verdict: Runtime Error):
counter = 0
for i in S:
	if i == 'S':
		counter = 0
	elif i == 'R':
      	counter += 1

return counter

Buggy submission (verdict: Runtime Error):
counter = 0
for i in S:
	if i == 'S':
		counter = 0
	elif i == 'R':
      	counter += 1

print(counter)
Problem p03079 (python)

Fixed submission:
A,B,C = map(int, input().split())
if A == B == C:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
s = str(input())
red = 0
blue = 0
if "R" in s:
    red += 1
elif "B" in s:
    blue += 1

if red > blue:
    print("Yes")
elif red == blue or red < blue:
    print("No")
Problem p02675 (python)

Fixed submission:
n = int(input())

if n >= 100:
    n = n%100
    if n >= 10:
        n = n%10
    if n == 3:
        print("bon")
    elif n == 0 or n == 1 or n == 6 or n == 8:
        print("pon")
    else:
        print("hon")
elif n <= 99 and n >= 10:
    n = n%10
    if n == 3:
        print("bon")
    elif n == 0 or n == 1 or n == 6 or n == 8:
        print("pon")
    else:
        print("hon")
else:
    if n == 3:
        print("bon")
    elif n == 0 or n == 1 or n == 6 or n == 8:
        print("pon")
    else:
        print("hon")

Buggy submission (verdict: Runtime Error):
import math

a,b,h,m = map(int,input().split())

hangle = float((h/12)*360)
hangle += float((m/60)*30)
mangle = float((m/60)*360)

if hangle > 180 and mangle > 180:
    angle = abs(hangle-mangle)
elif hangle > 180:
    hangle = 360-hangle
    angle = abs(hangle-mangle)
elif mangle > 180:
    mangle = 360-mangle
    angle = abs(hangle-mangle)
else:
    angle = abs(hangle-mangle)

if hangle > 180:
    hangle = 360-hangle
if mangle > 180:
    mangle = 360-mangle

angle = abs(hangle-mangle)
rad = math.radians(angle)

ans = float(math.sqrt(a*a + b*b - float(2*a*b*math.cos(rad))))

if m != 0 and h != 0:
    print('{:.10f}'.format(ans))
else :
    print(0)
Problem p02714 (python)

Fixed submission:
n = int(input())
s = input()

s = list(s)

k = r = b = g = count = 0

for i in range(len(s)):
    for j in range(i+1,len(s)):
        k = 2*j-i
        if k < n and s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
            count += 1    

rbg = s.count("R")*s.count("B")*s.count("G")

print(rbg-count)

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

count = 0

for i in range(0,len(s)):
    for j in range(i,len(s)):
        for k in range(j,len(s)):
            if(j-i != k-j) and (s[i] != s[j] and s[i] != s[k] and s[j] != s[k]):
                count += 1


print(count)
Problem p02732 (python)

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

b = []
total = 0

for i in range(n):
    b.append(0)

for i in range(n):
    b[a[i]-1] += 1
for i in range(n):
    if b[i] >= 2:   
        total += b[i]*(b[i]-1)//2



for i in range(n):
    ans = total
    ans -= b[a[i]-1]*(b[a[i]-1]-1)//2
    b[a[i]-1] -= 1
    ans += b[a[i]-1]*(b[a[i]-1]-1)//2
    print(ans)
    b[a[i]-1] += 1

Buggy submission (verdict: Runtime Error):
import math

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

b = []
total = 0

for i in range(n):
    b.append(0)

for i in range(n):
    b[a[i]] += 1

for i in range(n):
    b[a[i]] -=1
    for j in range(n):
        if b[j] >= 2:
            total += b[j]*(b[j]-1)//2
    print(total)
    total = 0
    b[a[i]] += 1

#for i in range(n):
 #   print(b[i])
Problem p02640 (python)

Fixed submission:
x,y=map(int,input().split())
if y%2==0 and 2*x<=y and y<=4*x:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split()))
print(a.index(0)+1)
Problem p02882 (python)

Fixed submission:
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    r=2*x/(a*b*b)

    print(const.convToDEG*(const.PI/2-math.atan(r)))

Buggy submission (verdict: Runtime Error):
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print("..")
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    h=2*x/(a*b)
    print(const.convToDEG*math.acos(h/b))

Buggy submission (verdict: Runtime Error):
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    print("..")
    h=2*x/(a*b)
    print(const.convToDEG*math.acos(h/b))

Buggy submission (verdict: Runtime Error):
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    h=2*x/(a*b)
    print(const.convToDEG*math.acos(h/b))

Buggy submission (verdict: Runtime Error):
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

halfVolume=a*a*b/2

if x>=halfVolume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    h=x/(a*b)
    print(const.convToDEG*math.acos(2*h/b))

Buggy submission (verdict: Runtime Error):
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

halfVolume=a*a*b/2
print(halfVolume)

if x>=halfVolume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    h=x/(a*b)
    print(const.convToDEG*math.acos(2*h/b))
Problem p03050 (python)

Fixed submission:
def solve(x):
    if(x<2):
        return 0
    k=1
    s=0
    while True:
        if(x%k==0):
            i=(x//k)-1
            if (x//i==x%i):
                s+=i
        k+=1
        if k*k>x:
            break
    return s
        

x=int(input())
print(solve(x))

Buggy submission (verdict: Runtime Error):

def solve(x):
    if(x==0):
        return 0
    k=1
    s=0
    while True:
        if(x%k==0):
            i=(x//k)-1
            if (x//i==x%i):
                s+=i
        k+=1
        if k*k>x:
            break
    return s
        

x=int(input())
print(solve(x))

Buggy submission (verdict: Runtime Error):

def solve(x):
    k=1
    s=0
    while True:
        if(x%k==0):
            i=(x//k)-1
            if (x//i==x%i):
                s+=i
        k+=1
        if k*k>x:
            break
    return s
        

x=int(input())
print(solve(x))
Problem p03071 (python)

Fixed submission:
a=list(map(int,input().split(" ")))
x,y=sorted(a)
if(y-1>x):
    print(y+y-1)
else:
    print(y+x)

Buggy submission (verdict: Runtime Error):
def init(a):
    cf=a[0]
    cc=0
    z=[]
    for it in a:
        if(it==cf):
            cc+=1
        else:
            if(cf=='0'):
                z.append(-cc)
            else:
                z.append(cc)
            cf=it
            cc=1
    z.append(cc)
    return z

p=[]
def solve(a,K):

    if(K==0):
        p.append(max(a))
        return
    N=len(a)
    if(K%2==0):
        if(a[0]>0):
            b=[]
            b.append(a[1]-a[0])
            for j in range(2,N):
                b.append(a[j])
            solve(b,K-1)
        if(a[N-1]>0):
            b=[]
            for j in range(2,N):
                b.append(a[j])
            b.append(a[N-2]-a[N-1]) 
            solve(b,K-1)            
        for i in range(1,N-1):
            if(a[i]>0):
                b=[]
                for j in range(0,i-1):
                    b.append(a[j])
                b.append(a[i-1]-a[i]+a[i+1])
                for j in range(i+2,N):
                    b.append(a[j])
                solve(b,K-1)
    else:
        if(a[0]<0):
            b=[]
            b.append(a[1]-a[0])
            for j in range(2,N):
                b.append(a[j])
            solve(b,K-1)
        if(a[N-1]<0):
            b=[]
            for j in range(2,N):
                b.append(a[j])
            b.append(a[N-2]-a[N-1]) 
            solve(b,K-1)            
        for i in range(1,N-1):
            if(a[i]<0):
                b=[]
                for j in range(0,i-1):
                    b.append(a[j])
                b.append(a[i-1]-a[i]+a[i+1])
                for j in range(i+2,N):
                    b.append(a[j])
                solve(b,K-1)

N,K=list(map(int,input().split(" ")))
a=str(input())
z=init(a)
L=len(a)
Q=0
if(z[0]<0):
    Q=N//2+1
else:
    Q=N//2
if(K>=Q):
    print(N)
else:

    solve(z,K)
    print(max(p))
Problem p03288 (python)

Fixed submission:
a=int(input())
if(a<1200):
  print("ABC")
elif a<2800:
  print("ARC")
else:
  print("AGC")

Buggy submission (verdict: Runtime Error):
a=int(input())
if(a<1200):
  print("ABC")
 elif a<2800:
  print("ARC")
 else:
  print("AGC")
Problem p03399 (python)

Fixed submission:
a=[]
for i in range(4):
 a.append(int(input()))
print(min(a[0],a[1])+min(a[2],a[3]))

Buggy submission (verdict: Runtime Error):
a=[]
for i in range(4):
 a.append(int(input())
print(min(a[0],a[1])+min(a[2],a[3]))

Buggy submission (verdict: Runtime Error):
a=[]
for i in range(4)
 a.append(int(input())
print(min(a[0],a[1])+min(a[2],a[3]))

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split(' ')))
print(min(a[0],a[1])+min(a[2],a[3]))
Problem p02576 (python)

Fixed submission:
n, x, t = map(int, input().split())
a = (n + x - 1) // x * t
print(a)

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
a = (n + x - 1) // x * t
print a
Problem p02791 (python)

Fixed submission:
m = input()
arr = input().split()
cnt = 0
flg = 1
mnn = arr[0]
for n in arr:
  if(int(n)>int(mnn)):
    continue
  else:
    mnn = n
    cnt = cnt + 1
print(cnt)

Buggy submission (verdict: Runtime Error):
8
5 7 4 2 6 8 1 3
Problem p02641 (python)

Fixed submission:
def abc170_c():
    def solve():
        x, n = map(int, input().split(' '))
        if n == 0:
            return x

        p = list(map(int, input().split(' ')))

        search_range_min = min(min(p), x) - 1
        search_range_max = max(max(p), x) + 1
        search_values = [i for i in range(search_range_min, search_range_max + 1) if i not in p]

        check_dict = {}

        for i in search_values:
            # 絶対値が小さいものを調べるので差の絶対値を格納
            check_dict[i] = abs(x - i)

        return min(check_dict, key=check_dict.get)
    print(solve())

if __name__ == '__main__':
    abc170_c()

Buggy submission (verdict: Runtime Error):
def abc170_c_1():
    """
    もうちょいコンパクトに書いてみる
    """
    def solve():
        x, n = map(int, input().split(' '))
        if n == 0:
            return x

        p = list(map(int, input().split(' ')))

        search_range_min = min(min(p), x) - 1
        search_range_max = max(max(p), x) + 1
        search_values = [i for i in range(search_range_min, search_range_max + 1) if i not in p]

        # min関数のkeyにxとの差の絶対値を直接渡してその値の最小値を取得してしまう。
        ans = min(search_values, key=lambda a: (abs(a - x)), x)

        # こっちはたぶん絶対値の差が同じ時にリストの先にあるほうをとってしまうので結果バグっている気がする
        # ans = min(search_values, key=lambda a: abs(a - x))

        return ans

    print(solve())

if __name__ == '__main__':
    abc170_c_1()
Problem p02861 (python)

Fixed submission:
def abc145_c():    
    n = int(input())
    xy = [list(map(int,input().split())) for i in range(n)]
    ans = 0
    for i in range(n):
        for j in range(n):
            ans += ((xy[i][0] - xy[j][0])** 2 + (xy[i][1] - xy[j][1])** 2)**0.5
    print(ans / n)
    
if __name__ == '__main__':
    abc145_c()

Buggy submission (verdict: Runtime Error):
def abc145_c():    
    n = int(input())
    xy = [list(map(int,input().split())) for i in range(n)]
    ans = 0
    for i in range(n):
        for j in range(n):
            cnt += 1
            ans += ((xy[i][0] - xy[j][0])** 2 + (xy[i][1] - xy[j][1])** 2)**0.5
    print(ans / n)
    
if __name__ == '__main__':
    abc145_c()
Problem p02789 (python)

Fixed submission:
n, m = map(int, input().split())
if n == m:
 print('Yes')
else:
 print('No')

Buggy submission (verdict: Runtime Error):
 n, m = map(int, input().split())
    if n == m:
        print('Yes')
    else:
        print('No')
Problem p02801 (python)

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

Buggy submission (verdict: Runtime Error):
print(char(ord(input())+1))

Buggy submission (verdict: Runtime Error):
print(input()+1)
Problem p02921 (python)

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

if S[1] == T[1]:
    count += 1

if S[2] == T[2]:
    count += 1
    
print(count)

Buggy submission (verdict: Runtime Error):
import sys
l = int(input())
s = list(map(int, input().split()))

while l > 0:
    for i in range(l-1):
        count = 1
        ss = s[i:i+l-2]
        for j in range(len(ss)-2):
            if ss[j] == ss[j+1]:
                count *= 1
            else:
                count *= 0
        if count == 1:
            print(i)
            sys.exit()
        l -= 1
Problem p02999 (python)

Fixed submission:
x, a = map(int, input().split())
if x < a:
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())
out = 0
if (x == w/2 and y!= 0 and y != h) or (y == h/2 and x != 0 and x != w) or (h*x == w*y and x !=0 and x != w):
  out = 1
print(w*h/2, out)
Problem p03106 (python)

Fixed submission:
def resolve():
    a, b, k = map(int, input().split())
    t = []
    for i in range(1, min(a,b)+1):
        if a % i == 0 and b % i == 0:
            t.append(i)
    print(t[-k])
resolve()

Buggy submission (verdict: Runtime Error):

def resolve():
    a, b, k = map(int, input().split())
    t = []
    for i in range(1, k+1):
        if a % i == 0 and b % i == 0:
            t.append(i)
    print(t[k-1])
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    a, b, k = map(int, input().split())
    L = []
    i = 1
    while len(L) < k:
        if a%i == 0 and b%i == 0:
            L.append(i)
        i += 1
    print(L[K-1])
resolve()
Problem p03110 (python)

Fixed submission:
def resolve():
    n = int(input())
    s = 0
    for _ in range(n):
        x, u = input().split()
        if u == 'BTC':
            s += float(x) * 380000
        else:
            s += float(x) * 1
    print(s)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    n = int(input())
    s = 0
    for _ in range(n):
        x, u = input().split()
        if u == 'BTC':
            s += float(x) * 380000
        else:
            s += float(x) * 1
    print(s)
resole()
Problem p03243 (python)

Fixed submission:
n = int(input())
a = -(-n//111)
if a == 10:
    print(1111)
else:
    print(a*111)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = -(-n//111)
if a = 10:
    print(1111)
else:
    print(a*111)