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

Fixed submission:
N,K=map(int,input().split())
td=[[int(a) for a in input().split()]for i in range(N)]

td=sorted(td,key=lambda x:-x[1])

ans=0
eat=set([])
noteat=[]
for t,d in td[:K]:
  ans+=d
  if t not in eat:
    eat.add(t)
  else:
    noteat.append(d)
temp_result=ans+len(eat)**2
max_result=temp_result

for t,d in td[K:]:
  if not noteat:
    break
  if t not in eat:
    temp_result+=2*len(eat)+1
    temp_result+=d-noteat.pop()
    eat.add(t)
    max_result=max(max_result,temp_result)
print(max_result)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
td=[[int(a) for a in input().split()]for i in range(N)]

td=sorted(td,key=lambda x:-x[1])

ans=0
eat=[]
noteat=[]
for t,d in td[:K]:
  ans+=d
  if t not in eat:
    eat.append(t)
  else:
    noteat.append(d)
temp_result=ans+len(eat)**2
max_result=temp_result

for t,d in td[K:]:
  if not noteat:
    break
  if t not in eat:
    temp_result+=2*len(eat)+1
    temp_result+=d-noteat.pop()
    eat.add(t)
    max_result=max(max_result,temp_result)
print(max_result)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
td=[[int a for a in input().split()]for i in range(N)]

td=sorted(td,key=lambda x:-x[1])

ans=0
eat=[]
noteat=[]
for t,d in td[:K]:
  ans+=d
  if t not in eat:
    eat.append(t)
  else:
    noteat.append(d)
temp_result=ans+sum(eat)**2
max_result=temp_result

for t,d in td[K:]:
  if not noteat:
    break
  if t not in eat:
    temp_result+=2*len(eat)+1
    temp_result+=d-noteat.pop()
    eat.add(t)
    max_result=max(max_result,temp_result)
print(max_result)
Problem p03136 (python)

Fixed submission:
kaku = input()
s_list = input().split(' ')
if not int(kaku) == len(s_list):
    print('No')
else:
    hen_list = [int(x) for x in s_list]
    m = max(hen_list)
    total = sum(hen_list)
    if m < total - m:
            print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
if int(kaku) != len(s_list):
    print('No')
else:
    hen_list = [int(x) for x in s_list]

    m = max(hen_list)
    total = sum(hen_list)
    print(m, total)

    if m < total - m:
            print('Yes')
    else:
        print('No')
Problem p03206 (python)

Fixed submission:
s=int(input())
if (s==25):
  print('Christmas')
elif (s==24):
  print('Christmas Eve')
elif (s==23):
  print('Christmas Eve Eve')
elif (s==22):
  print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
n=int(input())
p=[]
[p.append(int(input())) for i in range(n)]
print(sum(p)-max(p)//2)
Problem p03210 (python)

Fixed submission:
a=int(input())
if(a==3 or a==5 or a==7):
  print('YES')
else:print('NO')

Buggy submission (verdict: Runtime Error):
s=list(map(str,input()))
#print(s)
s_3=[]
for i in range(len(s)-2):
  a=''.join(s[i:(i+3)])
  #print(a)
  s_3.append(abs(int(a)-753))
print(min(s_3))
Problem p03219 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(input())
T,A=map(int,input().split())
H_list=list(map(int,input().split()))
a=list(map(lambda x:abs((T-x*0.006)-A), H_list))
#print(a)
#print(min(a))
print(a.index(min(a))+1)

Buggy submission (verdict: Runtime Error):
N=int(input())
T,A=map(int,input().split())
H_list=list(map(int,input().split()))
a=list(map(lambda x:abs(A-(T-x*0.006)), H_list))
#print(a)
print(min(a))
Problem p03238 (python)

Fixed submission:
if(1==int(input())):
  print('Hello World')
else:
  x,y=[int(input()) for i in range(2)]
  print(x+y)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
result = 1001
for _ in range(N):
    c, t = map(int, input().split())
    if t <= T:
        result = min(result, c)

if (result == 1001):
    print('TLE') 
else:
    print(result)

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
li = [list(map(int,input().split())) for i in range(N)]
#print(li)
t_cost=[T - li[i][1] for i in range(N)]
#print(t_cost)
if(all(x < 0 for x in t_cost)):#時間内Tに帰宅不可能な場合
  print('TLE')
else:#時間内に帰宅できる場合に最小コストのものを出力
  t_cost_1=[]
  for i in range(N):
    if(t_cost[i]>=0):
      t_cost_1.append(i)
    else:continue
  #print(t_cost_1)
  print(min([li[t_cost_1[i]][0] for i in range(len(t_cost_1))]))

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
li = [list(map(int,input().split())) for i in range(N)]
t_cost=[T - li[i][1] for i in range(N)]
if(all(x < 0 for x in t_cost)):
  print('TLE')
else:
  t_cost_1=[]
  for i in range(N):
    if(t_cost[i]>=0):
      t_cost_1.append(i)
    else:continue
  print(min([li[t_cost_1[i]][0] for i in range(len(t_cost_1))]))

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
li = [list(map(int,input().split())) for i in range(N)]
t_cost=[T - li[i][1] for i in range(N)]
if(all(x < 0 for x in t_cost)):
  print('TLE')
else:
  t_cost_1=[]
  for i in range(N):
    if(t_cost[i]>=0):
      t_cost_1.append(i)
    else:
  print(min([li[t_cost_1[i]][0] for i in range(len(t_cost_1))]))
Problem p03239 (python)

Fixed submission:
N,T=map(int,input().split())
li = [list(map(int,input().split())) for i in range(N)]
#print(li)
t_cost=[T - li[i][1] for i in range(N)]
#print(t_cost)
if(all(x < 0 for x in t_cost)):#時間内Tに帰宅不可能な場合
  print('TLE')
else:#時間内に帰宅できる場合に最小コストのものを出力
  t_cost_1=[]
  for i in range(N):
    if(t_cost[i]>=0):
      t_cost_1.append(i)
    else:continue
  #print(t_cost_1)
  print(min([li[t_cost_1[i]][0] for i in range(len(t_cost_1))]))

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
li = [list(map(int,input().split())) for i in range(N)]
t_cost=[T - li[i][1] for i in range(N)]
if(all(x < 0 for x in t_cost)):
  print('TLE')
else:
  t_cost_1=[]
  for i in range(N):
    if(t_cost[i]>=0):
      t_cost_1.append(i)
    else:
  print(min([li[t_cost_1[i]][0] for i in range(len(t_cost_1))]))
Problem p03260 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[input() for i in range(N)]
count=0
if(len(s)!=len(set(s))):
  count=1
else:
  for i in range(N-1):
    len_s=len(s[i])
    if(s[i][len_s-1]!=s[i+1][0]):
      count=1
      break
    else:continue
if(count==0):
	print('Yes')
else:print('No')
Problem p03261 (python)

Fixed submission:
N=int(input())
s=[input() for i in range(N)]
count=0
if(len(s)!=len(set(s))):
  count=1
else:
  for i in range(N-1):
    len_s=len(s[i])
    if(s[i][len_s-1]!=s[i+1][0]):
      count=1
      break
    else:continue
if(count==0):
	print('Yes')
else:print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[input() for i in range(N)]
if(len(s)!=len(set(s))):
  print('No')
else:
  count=0
  for i in range(N-1):
    len_s=len(s[i])
    if(s[i][len_s-1]!=s[i+1][0]):
      count=1
      break
    else:continue
if(count==0):
	print('Yes')
else:print('No')
Problem p03264 (python)

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

Buggy submission (verdict: Runtime Error):
x1,y1,x2,y2=map(int,input().split())
a=abs(x1-x2)
b=abs(y1-y2)
if(y1<=y2):
  if(x1<=x2):
    print(x2-b,y2+a,x1-b,y1+a)
  else:
    print(x2-b,y2-a,x1-b,y1-a)
else:
  if(x1<=x2):
    print(x2+a,y2-b,x1+a,y1-b)
  else:
    print(x2+b,y2+a,x1+b,y1-a)
Problem p03284 (python)

Fixed submission:
N,K=map(int,input().split())
print(0 if (N%K==0) else 1)

Buggy submission (verdict: Runtime Error):
N = int(input())
flag=False
max_i = N//4+1
for i in range(max_i):
  if((N-4*i)%7==0):
  	flag=True
  	break
print('Yes' if flag else 'No')

Buggy submission (verdict: Runtime Error):
N = int(input())
count=0
for i in range(26):
  for j in range((100-4*i)//7+1):
    M = N-4*i-7*j
    if(M==0):
      print('Yes')
      count+=1
      break
  if(count==1):
    break
if(count==0):
  print('No')
Problem p03292 (python)

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

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
T_0_equal=[]
for i in range(len(S)):
  if(T[0]==S[i]):
    T_0_equal.append(i)
#print(T_0_equal)
for i in range(len(T_0_equal)):
  count=0
  for j in range(len(S)):
    if(T[j]!=S[(j+T_0_equal[i])%len(S)]):
      break
    else:
      count+=1
  if(count==len(S)):
  	print('Yes')
  	exit()
print('No')
Problem p03324 (python)

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

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

Fixed submission:
a,b,c,d=map(int,input().split())
if (abs(a-c) <=d or (abs(a-b)<=d and abs(b-c)<=d)):
  print('Yes')
else:print('No')

Buggy submission (verdict: Runtime Error):
x=int(input())
ans=1
for j in range(2,11):
    i=1
    while i**j<=x:
        ans=max(ans,i**j)
        i+=1
print(ans)

Buggy submission (verdict: Runtime Error):
X=int(input())
n_max=0
for i in range(int(X**0.5)+1):
  if(X==1):
    n_max=1
    break
  else:
    for j in range(X):
      if((i+1)**(j+1)>X):
        #print('i='+str(i+1)+' j='+str(j))
        #print((i+1)**j)
        n_max=max(n_max,(i+1)**j)
        break
print(n_max)
Problem p03359 (python)

Fixed submission:
a,b=map(int,input().split())
print(a if (a<=b) else a-1)

Buggy submission (verdict: Runtime Error):
l=sorted(list(map(int,input().split())))
k=int(input())
#print(l,k)
l[2]=(2**k)*l[2]
print(sum(l))
Problem p03385 (python)

Fixed submission:
s=list(input())
if(s.count('a')==1 and s.count('b')==1 and s.count('c')==1):
  print('Yes')
else:print('No')

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
r=range(a,b+1)
for i in sorted(set(r[:k])|set(r[-k:])):print(i)#setで重複を避ける、リストの[:k]と[-k:]の範囲を得る
Problem p03399 (python)

Fixed submission:
a,b,c,d=[int(input()) for i in range(4)]
print(min(a,b)+min(c,d))

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(min(a,b)+min(c,d))
Problem p03407 (python)

Fixed submission:
a,b,c=map(int,input().split())
print('Yes' if (a+b>=c) else 'No')

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[input() for i in range(N)]
M=int(input())
l=[input() for i in range(M)]
list_str=list(dict.fromkeys(s+l))
s_l=[]
for i in range(len(list_str)):
  s_l.append(s.count(list_str[i])-l.count(list_str[i]))
print(all([i < 0 for i in s_l]))
if(all([i < 0 for i in s_l])):
  t='a'
  while(t==any(s_l)):
    t+='a'
  print(t)
else:print(max(s_l))
Problem p03415 (python)

Fixed submission:
s1=list(input())
print(s1[0],end='')
s2=list(input())
print(s2[1],end='')
s3=list(input())
print(s3[2])

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
S=0
for I in range(A,B+1):
	Q=str(I)
	R=Q[::-1]
	if R==Q:
		S+=1
print(S)
Problem p03423 (python)

Fixed submission:
n=int(input())
print(n//3)

Buggy submission (verdict: Runtime Error):
N=int(input())
s=list(map(str,input().split()))
print('Three' if s.count('Y')==0 else 'Four')
Problem p03486 (python)

Fixed submission:
s=sorted(list(input()))
t=sorted(list(input()))[::-1]
for i in range(min(len(s),len(t))):
  if(s[i]<t[i]):
    print('Yes')
    break
  elif(s[i]>t[i]):
    print('No')
    break
  else:
    if(i<min(len(s)-1,len(t)-1)):pass
    else:#sの長さまでは同じ。sの方が短ければYes、そうでなければNo
      if(len(s)<len(t)):
        print('Yes')
        break
      else:
        print('No')
        break

Buggy submission (verdict: Runtime Error):
s=sorted(list(input()))
t=sorted(list(input()))[::-1]
#print(s,t)
for i in range(len(s)):
  if(s[i]<t[i]):
    print('Yes')
    break
  elif(s[i]>t[i]):
    print('No')
    break
  else:
    if(i<len(s)-1):pass
    else:#sの長さまでは同じ。sの方が短ければYes、そうでなければNo
      if(len(s)<len(t)):
        print('Yes')
        break
      else:
        print('No')
        break

Buggy submission (verdict: Runtime Error):
s=sorted(list(input()))
t=sorted(list(input()))[::-1]
#print(s,t)
for i in range(len(s)):
  if(s[i]<t[i]):
    print(s[i],t[i])
    print('Yes')
    break
  elif(s[i]>t[i]):
    print('No')
    break
  else:
    if(i<len(s)-1):pass
    else:#sの長さまでは同じ。sの方が短ければYes、そうでなければNo
      if(len(s)<len(t)):
        print('Yes')
        break
      else:
        print('No')
        break
Problem p03493 (python)

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

Buggy submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Buggy submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, input().split( )))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))
Problem p03563 (python)

Fixed submission:
R=int(input())
G=int(input())
print(2*G-R)

Buggy submission (verdict: Runtime Error):
R,G=map(int,input().split())
print(2*G-R)
Problem p03573 (python)

Fixed submission:
l=list(map(int,input().split()))
if(l[0]==l[1]):
  print(l[2])
elif(l[1]==l[2]):
  print(l[0])
else:print(l[1])

Buggy submission (verdict: Runtime Error):
l=list(map(int,input().split()))
if(l[0]==l[1]):
  print(l[2])
elif(l[1]==l[2]):
  print(l[0]):
else:print(l[1])

Buggy submission (verdict: Runtime Error):
l=map(int,input().split())
if(l[0]==l[1]):
  print(l[2])
elif(l[1]==l[2]):
  print(l[0]):
else:print(l[1])
Problem p03643 (python)

Fixed submission:
print('ABC'+input())

Buggy submission (verdict: Runtime Error):
print('ABC'+N)
Problem p03206 (python)

Fixed submission:
d = int(input())
if (d == 22):
    print('Christmas Eve Eve Eve')
elif (d == 23):
    print('Christmas Eve Eve')
elif (d == 24):
    print('Christmas Eve')
else:
    print('Christmas')

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
h = [int(input()) for i in range(n)]
h.sort()
answer = h[-1] - h[0]
for i in range(n - k + 1):
    answer = min(answer, h[i + k - 1] - h[i])
print(answer)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
h = [int(input()) for i in range(n)]
h.sort()
answer = h[-1] - h[0]
for i in range(n - k + 1):
    answer = min(answer, h[i + k - 1] - h[i])
print(answer)
Problem p03220 (python)

Fixed submission:
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
L = []

for i in range(n):
    L.append(abs(a - (t - h[i] * 0.006)))
print(L.index(min(L)) + 1)

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

avg_tmp = abs(t - (lis[0] * 0.006) - a)
c = 0
for i in range(1, n):
    min_diff = abs(t - (lis[i] * 0.006) - a)
    if(avg_tmp > min_diff):
        l = i
print(l+1)
Problem p03351 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
if abs(a-b) <= d and abs(b-c) <= d:
    print('Yes')
elif abs(a-c) <= d:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
print('Yes' if (abs(a - b) <= d and abs(b - c) <= d) or abs(a - c) <= d else 'No')
Problem p03339 (python)

Fixed submission:
N = int(input())
S = input()
right = S[1:].count('E')
left = 0
answer = right
_reader = S[0]

for i in range(1, N):

    if _reader == "W":
        left += 1

    _reader = S[i]
    
    if _reader == "E":
        right -=1

    t = left + right
    answer = answer if answer <= t else t
        

print(answer)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
print(min(map(lambda x: x[0].count(
    "W") + x[1].count("E"),  [(s[:x], s[x+1:]) for x in range(n - 1)])))
Problem p03136 (python)

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

n = len(l)

lm = 0
ls = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]
  ls = ls + l[i]
ls = ls - lm

if lm < ls:
  print("Yes")
else:
  print("No")

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

lm = 0
ls = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]
  ls = ls + l[i]
ls = ls - lm

if lm < ls:
  print("Yes")
else:
  print("No")

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

lm = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]

ls = -1 * lm
for i in range(0, n):
  ls = ls + l[i]

if lm < ls:
  print("Yes")
else:
  print("No")
Problem p03136 (python)

Fixed submission:
from sys import stdin
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]

if max(L) < sum(L) - max(L):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import itertools
N = map(int, input().split())
L = [map(int, input().split())]
if max(L) < sum(L) - max(L):
    print('Yes')
else:
    print('No')
Problem p03136 (python)

Fixed submission:
s = int(input())
A = list(map(int, input().split())) 
m = max(A)
if sum(A) - int(m) > int(m):
    print("Yes")
elif sum(A) - int(m) <= int(m):
    print("No")

Buggy submission (verdict: Runtime Error):
s = int(input())
n = int(1)
string_list = [input().split() for i in range(n)]
int_list = [int(s) for s in string_list]
m = max(int_list)
if sum(int_list) - int(m) > int(m):
    print("Yes")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
s = int(input())
n = "1"
string_list = [input() for i in range(n)]
int_list = (int(s) for s in string_list)
m = max(int_list)
if sum(int_list) - int(m) > int(m):
    print("Yes")
elif print("NO")

Buggy submission (verdict: Runtime Error):
s = int(input())
n = "1"
string_list = [input() for i in range(n)]
int_list = (int(s) for s in string_list)
m = max(int_list)
if sum(int_list) - int(m) > int(m)
else print("Yes")
elif print("NO")
Problem p03493 (python)

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

Buggy submission (verdict: Runtime Error):
s = input(str())
print(s.text("1"))
Problem p03214 (python)

Fixed submission:
import numpy as np
N = input()
a = [int(i) for i in input().split()]
ans = np.argmin(np.abs(a - np.mean(a)))
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools
import numpy as np
N = int(input())
S = [i for i in list(input())]
Q = int(input())
k = [int(i) for i in input().split()]
S = np.array(S, dtype=None)
 
index_D = np.where(S == 'D')[0]
index_M = np.where(S == 'M')[0]
index_C = np.where(S == 'C')[0]
xx, yy, zz = np.meshgrid(index_D, index_M, index_C)
a_b_c = np.c_[xx.ravel(), yy.ravel(), zz.ravel()]

for k_i in k:
    count = 0
    for abc in a_b_c:
        if abc[0] < abc[1] < abc[2] and abc[2] - abc[0] < k_i:
            count += 1
    print(count)
Problem p03155 (python)

Fixed submission:
squ=int(input())
h=int(input())
w=int(input())

print((squ-h+1)*(squ-w+1))

Buggy submission (verdict: Runtime Error):
num=int(input())
line=input().split(" ")
a=int(line[0])
b=int(line[1])
low=[]
middle=[]
high=[]

lines=input().split(" ")


for i in range(num):
    n=int(lines[i])
    if n<=a:
        low.append(n)
    elif n<=b:
        middle.append(n)
    else:
        high.append(n)

print(min(len(low),len(middle),len(high)))
Problem p03206 (python)

Fixed submission:
D=input()
 
if D=='25':
    print('Christmas')
elif D=='24':
    print('Christmas Eve')
elif D=='23':
    print('Christmas Eve Eve')
elif D=='22':
    print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [int(input()) for i in range(N)]

total = int(max(a)/2)
print(max(a))
print(total)
a.remove(max(a))
print(a)
total += sum(a)
Problem p03260 (python)

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

cntYes = 0
for C in range(1,4):
    ans = int(input[0])*int(input[1])*C
    if ans%2!=0:
       cntYes += 1
if cntYes>0:
    print('Yes')
else:
    print('No')

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

cntYes = 0
for C in range(1,4):
    ans = int(input[0])*int(input[1])*C
    if ans%2!=0:
       cntYes += 1
if cnt>0:
    print('Yes')
else:
    print('No')
Problem p03337 (python)

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

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

add = A + B
sub = A - b
mui = A * B

print(max(add, sub, mui))

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
print(max(A+B, A=B, A*B))
Problem p03415 (python)

Fixed submission:
s1 = input()
s2 = input()
s3 = input()

print(s1[0] + s2[1] + s3[2])

Buggy submission (verdict: Runtime Error):
n1 = list(map(str, input().split()))
n2 = list(map(str, input().split()))
n3 = list(map(str, input().split()))

print(n1[0] + n2[1] + n3[2])
Problem p03456 (python)

Fixed submission:
import math
 
a, b = map(str, input().split())
num = int(a + b)
 
if math.sqrt(num).is_integer():
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import math

a, b = map(str, input().split())
num = int(a + b)

if math.sqrt(num)is_integer():
  print('Yes')
else:
  print('No')
Problem p03485 (python)

Fixed submission:
import math
 
a, b = map(float, input().split())

mean = (a + b) / 2
print(math.ceil(mean))

Buggy submission (verdict: Runtime Error):
import math
 
a = float(input())
b = float(input())

mean = (a + b) / 2
print(math.ceil(mean))

Buggy submission (verdict: Runtime Error):
import math

a = int(input())
b = int(input())
mean = (a + b) / 2
print(math.ceil(mean))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
mean = (a + b) / 2
print(math.ceil(mean))

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
mean = (a + b) / 2
print(math.ceil(mean))

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

print(math.ceil((a + b) / 2))
Problem p03493 (python)

Fixed submission:
n = str(input())
count = 0
for i in range(len(n)):
  if n[i] == '1':
    count += 1
  else:
    count += 0
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
count = 0
for i in range(len(n)):
  if n[i] == 1:
    count += 1
  else:
    count += 0
print(count)

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

count = 0

for i in (len(s)):
  if s[i] == '1':
    count = count + 1

print(count)
Problem p03501 (python)

Fixed submission:
N, A, B = map(int, input().split())
 
if N * A >= B:
  print(B)
else:
  print(N * A)

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

if N * A >= B:
  print(B)
else:
  print(N * A)
Problem p03543 (python)

Fixed submission:
N = input()
if(N[0] == N[1] == N[2] or
   N[1] == N[2] == N[3]):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = input()
 
if ((n[0] == n[1] == n[2] or (n[1] == n[2] == n[3])):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = input()
 
if (n[0] == n[1] == n[2] or (n[1] == n[2] == n[3]):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
 
if ((n[0] == [1] and n[1] == n[2]) or (n[1] == n[2] and n[2] == n[3])):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
 
if ((n[0] == [1] and n[1] == n[2]) or (n[1] == n[2] and n[2] == n[3]) or (n[3] == n[0] and n[0] == [1])):
  print("Yes")
else:
  print("No")

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

if (n[0] == [1] and n[1] == n[2]) or (n[1] == n[2] and n[2] == n[3]) or (n[3] == n[0] and n[0] == [1]):
  print("Yes")
else:
  print("No")
Problem p03555 (python)

Fixed submission:
a = str(input())
b = str(input())
 
rev_a = a[::-1]
 
if rev_a == b:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
a = str(input())
b = str(input())
 
rev_a = a[::-1]
 
if rev_a == b:
    print('YES)
else:
    print('NO')

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

rev_a = a[::-1]

if rev_a == b:
  print('YES)
else:
  print('NO')
Problem p03605 (python)

Fixed submission:
N = str(input())

if N[0] == '9' or N[1] == '9':
  print('Yes')
else:
  print('No')

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

if n in '9':
  print("Yes")
else:
  print("No")
Problem p03610 (python)

Fixed submission:
s = input()
s_add = ""
for i in range(len(s)):
  if i % 2 == 0:
    s_add = s_add + s[i]
print(s_add)

Buggy submission (verdict: Runtime Error):
s = input()
s_add
for i in range(len(s)):
  if i % 2 == 1:
    s_add = s[i]
print(s)