Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(a[n-1]=a[0])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(a[n-1]-a[0])
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
n=0
for i in range(1,a-b+1):
  n+=i
print(n-b)


Fixed submission:
n=int(input())
if n<1000:
    print("ABC")
else:
    print("ABD")
Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=0
for i in range(n//2+1):
  l=[int(j) for j in list(str(i))]
  m=[int(k) for k in list(str(n-i))]
  if ans<sum(j)+sum(m):
    ans=sum(j)+sum(m)
print(ans)

Fixed submission:
n=int(input())
ans=n
for i in range(1,n):
  l=[int(j) for j in list(str(i))]
  m=[int(k) for k in list(str(abs(n-i)))]
  if ans>sum(l)+sum(m):
    ans=sum(l)+sum(m)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input());s=input();print(max(len(set(s[:i])&set(s[i:]))for i in range(n)))
#copy code

Fixed submission:
a,b=map(int,input().split())
s=[a+b,a-b,a*b]
print(max(s))
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=list(input())
a=[]
kind=0
l=[]
for i in s:
  l.append(i)
  for j in l:
    if j in s:
      kind+=1
  a.append(kind)
print(max(kind))

Fixed submission:
n=int(input());s=input();print(max(len(set(s[:i])&set(s[i:]))for i in range(n)))
#copy code
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,k=map(int,input().split())
n=[a,b,c]
for i in range(k):
  A=n[1]+n[2]
  B=n[0]+n[2]
  C=n[0]+n[1]
  n[0]=A
  n[1]=B
  n[2]=C
if n[0]-n[1]>10**18:
  print("Unfair")
else:
  print(n[0]-n[1])

Fixed submission:
a,b,c,k=map(int,input().split())
if k%2==0:
  print(a-b)
else:
  print(b-a)
Buggy python submission (verdict: Runtime Error):
x=int(input())
n=[]
for i in range(1,32):
  for j in range(2,10):
    if j**i<x:
      l.append(j**i)
print(max(l))

Fixed submission:
x=int(input())
n=[]
for i in range(1,32):
  for j in range(2,10):
    if i**j<=x:
      n.append(i**j)
print(max(n))
Buggy python submission (verdict: Runtime Error):
n=map(ijnt,input().split())
k=int(input())
n.sort(reverse=True)
print(n[0]*(2**k)+n[1]+n[2])


Fixed submission:
n=list(map(int,input().split()))
k=int(input())
n.sort(reverse=True)
print(n[0]*(2**k)+n[1]+n[2])

Buggy python submission (verdict: Runtime Error):
n=map(ijnt,input().split())
k=int(input())
n.sort(reverse=True)
print(n[0]*k+n[1]+n[2])

Fixed submission:
n=list(map(int,input().split()))
k=int(input())
n.sort(reverse=True)
print(n[0]*(2**k)+n[1]+n[2])
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
cnt=0
n=[]
for i in range(len(a)):
  for j in range(i+1,len(a)):
    if n[i-1]==0:
      continue
    elif sum(a[i:j])==0:
      cnt+=1
print(cnt)

Fixed submission:
from collections import Counter
n=int(input())
a = [int(i) for i in input().split()]
b=[0]
s=0
for i in a:
  s+=i
  b.append(s)
c= Counter(b)
ans=0
for i in c:
  ans+=int(c[i]*(c[i]-1)/2)
print(ans)
#copy code
Buggy python submission (verdict: Runtime Error):
s=set(input())
S=set(a,b,c)
if s==S:
    print("Yes")
else:
    print("No")


Fixed submission:
s=list(input())
if "a" in s:
    if "b" in s:
        if "c" in s:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
s=list(input())
if a,b,c in n:
    print("Yes")
else:
    print("No")

Fixed submission:
s=list(input())
if "a" in s:
    if "b" in s:
        if "c" in s:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=list(range(a,b+1))
m=sorted(l,reverse=True)
n=[]
for i in range(k):
  if i+1<=len(l):
    n.append(l[i])
    n.append(m[i])
  else:
    break
n=sorted(list(set(n)))
for i in n:
  print(i)

Fixed submission:
A, B, K = map(int,input().split())
ans = []
for i in range(A, B+1)[:K]:
  ans.append(i)
for i in range(A, B+1)[-K:]:
  ans.append(i)
for a in sorted(list(set(ans))):
  print(a)
#copy page

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l=range(a,b+1)
for i in range(k):
  print(l[i])

Fixed submission:
A, B, K = map(int,input().split())
ans = []
for i in range(A, B+1)[:K]:
  ans.append(i)
for i in range(A, B+1)[-K:]:
  ans.append(i)
for a in sorted(list(set(ans))):
  print(a)
#copy page
Buggy python submission (verdict: Runtime Error):
n=int(input())
d,x=map(int,input().split())
a=[int(input()) for i in range(n)]
total=1
for j in a:
  taotal+=len(range(1,,j))
print(total)

Fixed submission:
n=int(input())
d,x=map(int,input().split())
a=[int(input()) for i in range(n)]
total=x
for j in a:
  total+=len(range(1,d+1,j))
print(total)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
count=0
for i in range(a,b+1):
  i=str(i)
  if i==i[::-1]:
    count+=1
print(count)


Fixed submission:
a=list(input())
b=list(input())
c=list(input())
print(a[0]+b[1]+c[2])
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
count=0
for i in range(a,b+1):
  if i==i[::-1]:
    count+=1
print(count)

Fixed submission:
a,b=map(int,input().split())
count=0
for i in range(a,b+1):
  i=str(i)
  if i==i[::-1]:
    count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=int(input())
N=n%500
if N<=a:
    pritnt("Yes")
else:
    peint("No")

Fixed submission:
n=int(input())
a=int(input())
N=n%500
if N<=a:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(eval("+".join(a[::2]))-eval("+".join(a[1::2])))

Fixed submission:
n=input()
a=list(map(int,input().split()))
a.sort(reverse=True)
print(sum(a[::2])-sum(a[1::2]))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a*B%2==0:
    print("Even")
else:
    print("Odd")

Fixed submission:
a,b=map(int,input().split())
if a*b%2==0:
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
s=list(input())
s[3]=8
S="".join(s)
print(S)


Fixed submission:
s=list(input())
s[3]="8"
S="".join(s)
print(S)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().spilt())
if a+b==c+d:
    print("Balanced")
elif a+b>c+d:
    print("Left")
elif a+b<c+d:
    print("Right")


Fixed submission:
a,b,c,d=map(int,input().split())
if a+b==c+d:
    print("Balanced")
elif a+b>c+d:
    print("Left")
elif a+b<c+d:
    print("Right")

Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().spilt())
if a+b==c+d:
    print("Balanced")
elif (a+b)>(c+d):
    print("Left")
elif (a+b)<(c+d):
    print("Right")


Fixed submission:
a,b,c,d=map(int,input().split())
if a+b==c+d:
    print("Balanced")
elif a+b>c+d:
    print("Left")
elif a+b<c+d:
    print("Right")

Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().spilt())
if a+b==c+d:
    print("Balanced")
elif (a+b)>(c+d):
    print("Left")
else:
    print("Right")


Fixed submission:
a,b,c,d=map(int,input().split())
if a+b==c+d:
    print("Balanced")
elif a+b>c+d:
    print("Left")
elif a+b<c+d:
    print("Right")

Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().spilt())
if a+b==c+d:
    print("Balanced")
elif (a+b)>(c+d):
    print("a+b")
else:
    print("c+d")

Fixed submission:
a,b,c,d=map(int,input().split())
if a+b==c+d:
    print("Balanced")
elif a+b>c+d:
    print("Left")
elif a+b<c+d:
    print("Right")
Buggy python submission (verdict: Runtime Error):
input()
n=eval(input().replace(' ','|'))
print(len(bin(n&-n))-3)
#コピペです。

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

Buggy python submission (verdict: Runtime Error):
length = int(input())
a_list = map(int, input().split())

num_list = []
for a in a_list:
    t = a
    num = 0
    while t % 2 == 0:
        num += 1
        t = t / 2
    num_list.append(num)

print(min(num_list))
#こぴぺです。


Fixed submission:
s=str(input())
print(s.count("1"))
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
cnt=0
for _ in range(len(bin(max(a))-2):
  for i in a:
    if a%2==1:
      break
  cnt+=1
print(cnt)

Fixed submission:
length = int(input())
a_list = map(int, input().split())

num_list = []
for a in a_list:
    t = a
    num = 0
    while t % 2 == 0:
        num += 1
        t = t / 2
    num_list.append(num)

print(min(num_list))
#こぴぺです。

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a=eval("+".join(str(a)))
l=0
while a%2==0:
  l+=1
print(l)

Fixed submission:
length = int(input())
a_list = map(int, input().split())

num_list = []
for a in a_list:
    t = a
    num = 0
    while t % 2 == 0:
        num += 1
        t = t / 2
    num_list.append(num)

print(min(num_list))
#こぴぺです。
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=eval("+".join(n))
if n%s==0:
  print("Yes")
else:
  print("No")

Fixed submission:
n=int(input())
s=eval("+".join(str(n)))
if n%s==0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n=[input() for i in range(4)]
if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
    print("Yes")
else:
    print("No")

Fixed submission:
n=list(input())
if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N=input().replace(""," ").split()
N=set(N)
if len(N)<=2:
    print("Yes")
elif len(N)>=3
    print("No")


Fixed submission:
n=list(input())
if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N=input().replace(""," ").split()
N=set(N)
if len(N)=<2:
    print("Yes")
else:
    print("No")

Fixed submission:
n=list(input())
if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(str,input().split())
e,f,g=map(str,input().split())
if a==g and b==f and c==e:
    print("YES")
else:
    print("NO")

Fixed submission:
a,b,c=map(str,input().replace(""," ").split())
e,f,g=map(str,input().replace(""," ").split())
if a==g and b==f and c==e:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
N=map(int,input().replace("",",").split())
if 9 in N:
    print("Yes")
else:
    print("No")


Fixed submission:
N=map(str,input().replace(""," ").split())
if "9" in N:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
s=list(input())
s.sort()
l=[chr(ord("a")+i) for i in range(26)]
n=[]
for j in l:
  if j not in s:
    n.pop(j)
n.sort()
print(n)


Fixed submission:
x,a,b=map(int,input().split())
if abs(x-a)<abs(x-b):
    print("A")
else:
    print("B")
Buggy python submission (verdict: Runtime Error):
s=list(input())
s.sort()
l=[chr(ord("a")+i) for i in range(26)]
n=[]
for j in l:
  if j not in s:
    n.append(j)
n.sort()
print(n[0])

Fixed submission:
s=list(input())
s.sort()
l=[chr(ord("a")+i) for i in range(26)]
n=[]
for j in l:
  if j not in s:
    n.append(j)
n.sort()
if len(n)==0:
  print("None")
else:
  print(n[0])

Buggy python submission (verdict: Runtime Error):
s=list(input())
s.sort()
l=[chr(ord("a")+i) for i in range(26)]
n=[]
for j in l:
  if j not in s:
    n.append(j)
n.sort()
print(n[0])

Fixed submission:
s=list(input())
s.sort()
l=[chr(ord("a")+i) for i in range(26)]
n=[]
for j in l:
  if j not in s:
    n.append(j)
n.sort()
if len(n)==0:
  print("None")
else:
  print(n[0])
Buggy python submission (verdict: Runtime Error):
print(["No","Yes"][input()==input()[::-1]])

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

Buggy python submission (verdict: Runtime Error):
N=int(input())
if N==N[::-1]:
    print("Yes")
else:
    print("No")

Fixed submission:
N=str(input())
if N==N[::-1]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(max(min(b,d)-max(a,c)),0)
  


Fixed submission:
a,b,c,d=map(int,input().split())
print(max(min(b,d)-max(a,c),0))
Buggy python submission (verdict: Runtime Error):
s=input()
s_0=s.append(0)
s_n=s.append(len(s))
print(s_0+str(len(s))+s_n)

Fixed submission:
s=list(input())
s_0=s.pop(0)
s_n=s.pop(len(s)-1)
print(str(s_0)+str(len(s))+str(s_n))
Buggy python submission (verdict: Runtime Error):
print(2**(len(bin(int(input()))-3))

Fixed submission:
print(2**(len(bin(int(input())))-3))
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(int(input()))
l.sort(reverse=True)
s=0
for i in range(k):
    s+=l[i]
print(l)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort(reverse=True)
s=0
for i in range(k):
    s+=l[i]
print(s)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[i+1:int(input()) for i in range(n)]
v=1
for c in range(n):
    v=a[v]
    if v==2:
        print(c+1)
        break
else:
    print(-1)

Fixed submission:
n=int(input())
a={i+1:int(input()) for i in range(n)}
v=1
for c in range(n):
    v=a[v]
    if v==2:
        print(c+1)
        break
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
S=map(int,input().replace(" ",""))
if S%4==0:
    print("YES")
else:
    print("NO")


Fixed submission:
S=int(input().replace(" ",""))
if S%4==0:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
S=map(int,input().replace(" ",""))
if S%4==0:
    print("YES")
else:
    print("NO")

Fixed submission:
S=int(input().replace(" ",""))
if S%4==0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
print(["error",A+B],[sum(list(map(int,input().split())))<10])


Fixed submission:
A,B=map(int,input().split())
if A+B<10:
    print(A+B)
else:
    print("error")

Buggy python submission (verdict: Runtime Error):
print(["error",A+B],[eval(input().split().replace(" ","+"))<10])


Fixed submission:
A,B=map(int,input().split())
if A+B<10:
    print(A+B)
else:
    print("error")

Buggy python submission (verdict: Runtime Error):
print(["error",eval(input().replace(" ","+"))],[eval(input().replace(" ","+"))<10])


Fixed submission:
A,B=map(int,input().split())
if A+B<10:
    print(A+B)
else:
    print("error")

Buggy python submission (verdict: Runtime Error):
print(["error",A+B],[eval(input().replace(" ","+"))<10])

Fixed submission:
A,B=map(int,input().split())
if A+B<10:
    print(A+B)
else:
    print("error")

Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A+B<10:
    print(A+B)
else:A+B>=10:
    print("erorr")


Fixed submission:
A,B=map(int,input().split())
if A+B<10:
    print(A+B)
else:
    print("error")
Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())
picture = [input() for i in range(H)]
print('#'*(W+2))
for i in range(H):
    print('#' + picture[i] + '#')
print('#'*(W+2))
#コピペです。


Fixed submission:
x,y=map(int,input().split())
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
C=[2]
if x in A:
    if y in A:
        print("Yes")
    else:
        print("No")
elif x in B:
    if y in B:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
for i in range(1,b+1):
    if (a*i)%b==c:
        print("YES")
        break
else:
    print("NO")
        


Fixed submission:
A,B,C=input().split()
if (A[::-1])[0]==B[0] and (B[::-1])[0]==C[0]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print("YES" if any((a*i)%b==c for i in range(1, b+1)) else "NO")
#コピペです。

Fixed submission:
A,B,C=input().split()
if (A[::-1])[0]==B[0] and (B[::-1])[0]==C[0]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
A,B,C=map(str,input().split())
print(A[0].upper+B[0].upper+C[0].upper)


Fixed submission:
A, B, C = input().split()
print(A[0].upper()+B[0].upper()+C[0].upper())

Buggy python submission (verdict: Runtime Error):
A,B,C=input().split()
print(A[0].upper+B[0].upper+C[0].upper)

Fixed submission:
A, B, C = input().split()
print(A[0].upper()+B[0].upper()+C[0].upper())
Buggy python submission (verdict: Runtime Error):
abc=list(map(int,input().split()))
abc.sort(reverce=True)
if a[0]-a[1]=a[1]-a[2]:
    print("YES")
else:
    print("NO")

Fixed submission:
abc=list(map(int,input().split()))
abc.sort(reverse=True)
if abc[0]-abc[1]==abc[1]-abc[2]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
o=input()
e=input()
l=0
if abs(o-e)==0:
    for i in range(len(e)):
        l+=o[i]+e[i]
    print(l)
else:
    for j in range(len(e)):
        l+=o[i]+e[i]
    l+=o[len(e)]
    print(l)

Fixed submission:
o=input()
e=input()
s=""
if len(o)==len(e):
    for i in range(len(o)):
        s+=o[i]
        s+=e[i]
else:
    for j in range(len(e)):
        s+=o[j]
        s+=e[j]
    s+=o[len(e)]
print(s)
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
print(eval(A+B))

Fixed submission:
A,B=map(int,input().split())
if A+B>=24:
    print(A+B-24)
else:
    print(A+B)
Buggy python submission (verdict: Runtime Error):
N=int(input())
x=int(N*800)
y=int(N//15*200)
print(eval(x-y))


Fixed submission:
N=int(input())
x=int(N*800)
y=int(N//15*200)
print(x-y)

Buggy python submission (verdict: Runtime Error):
N=int(input())
x=N*800
y=N//15*200
print(eval(x-y))

Fixed submission:
N=int(input())
x=int(N*800)
y=int(N//15*200)
print(x-y)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=1
for i in range(1,n+1):
  ans=ans*i
print(ans%(10**9+7))

Fixed submission:
n=int(input())
j=1
for i in range(1,n+1):
  j=(j*i)%(10**9+7)
print(j)

Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=1
for i in range(1,n+1):
  ans=ans*i
print(ans/(10**9+7))

Fixed submission:
n=int(input())
j=1
for i in range(1,n+1):
  j=(j*i)%(10**9+7)
print(j)
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().strip().split(" "))

a=[input() for i  in range(N)
b=[input() for i in range(M)]
N=0

if b[i] in a[i]:
    N+=1
    
if(N==M):
    print("Yes")
else:
    print("No")
#コピペです。


Fixed submission:
N,M=map(int,input().strip().split(" "))

a=[]
b=[]

for i in range(N):
    a.append(input())

N=0

for i in range(M):
    b.append(input())
    if(b[i] in a[i]):
        N+=1

if(N==M):
    print("Yes")
else:
    print("No")
#コピペです。
Buggy python submission (verdict: Runtime Error):
n=input()
s=list(input())
x=0
l=[]
for i in s:
    if i=="I":
        x+=1
    elif i=="D":
        x-=1
    l.append(x)
print(max(l))


Fixed submission:
A,B,C,D=map(int,input().split())
sone=A*B
stwo=C*D
if sone>stwo:
    print(sone)
elif sone<stwo:
    print(stwo)
elif sone==stwo:
    print(sone)

Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,inputa().split())
print(max(a*b,c*d))

Fixed submission:
A,B,C,D=map(int,input().split())
sone=A*B
stwo=C*D
if sone>stwo:
    print(sone)
elif sone<stwo:
    print(stwo)
elif sone==stwo:
    print(sone)

Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input().split())
sone=A*B
stwo=C*D
if sone>stwo:
    print(sone)
elif sone<stwo:
    print(stwo):
elif sone==stwo:
    print(sone)

Fixed submission:
A,B,C,D=map(int,input().split())
sone=A*B
stwo=C*D
if sone>stwo:
    print(sone)
elif sone<stwo:
    print(stwo)
elif sone==stwo:
    print(sone)
Buggy python submission (verdict: Runtime Error):
s=input()
pritn(s.replace(",", " "))


Fixed submission:
s=input()
print(s.replace(",", " "))

Buggy python submission (verdict: Runtime Error):
pritn(input().replace(",", " "))


Fixed submission:
s=input()
print(s.replace(",", " "))

Buggy python submission (verdict: Runtime Error):
pritn(input().replace(","," "))

Fixed submission:
s=input()
print(s.replace(",", " "))
Buggy python submission (verdict: Time Limit Exceeded):
k,s=map(int,input().split())
cnt=0
ans=0
for i in range(k+1):
  for j in range(k+1):
    for k in range(k+1):
      ans=i+j+k
      if ans==s:
        cnt+=1
print(cnt)

Fixed submission:
k,s=map(int,input().split())
print(sum(0<=s-x-y<=k for x in range(k+1) for y in range(k+1)))
#コピペです。

Buggy python submission (verdict: Runtime Error):
k,s=map(int,input().split())
cnt=0
ans=0
for i in range(k+1):
  for j in range(k+1):
    for k in range(k+1):
      ans=i+j+k
      if ans=s:
        cnt+=1
print(cnt)

Fixed submission:
k,s=map(int,input().split())
print(sum(0<=s-x-y<=k for x in range(k+1) for y in range(k+1)))
#コピペです。
Buggy python submission (verdict: Runtime Error):
a,b,c=map(str,input().split())
s="{}{}{}".format(a,b,c)
print(int(s))

Fixed submission:
print(eval(input()))
Buggy python submission (verdict: Runtime Error):
a,b,c=list(input().split())
u=[[a],[b],[c]]
print(a(0)+b(0)+c(0))

Fixed submission:
a,b,c=map(str,input().split())
print(a[0]+b[0]+c[0])
Buggy python submission (verdict: Time Limit Exceeded):
x,y,a=map(int,input().split())
s=0
for i in range(x,y+1):
    if i%a==0:
        s+=1
print(s)

Fixed submission:
a,b,x=map(int,input().split())
print(b//x-(a-1)//x)
#コピペです。

Buggy python submission (verdict: Runtime Error):
x,y,a=map(int,input().split())
s=0
for i in range[x:y]:
    if i%a==0:
        s+=1
print(s)
        

Fixed submission:
a,b,x=map(int,input().split())
print(b//x-(a-1)//x)
#コピペです。
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
c=0
for i in range(h):
  c+=input().count("#")
print("Possible" if c=h+w-1 else "Impossible")


Fixed submission:
h,w=map(int,input().split())
c=0
for i in range(h):
  c+=input().count("#")
print("Possible" if c==h+w-1 else "Impossible")

Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
c=0
for i in range(h):
  c+=input().count("#")
print("Possible" if c=h+w-1: "Impossible")


Fixed submission:
h,w=map(int,input().split())
c=0
for i in range(h):
  c+=input().count("#")
print("Possible" if c==h+w-1 else "Impossible")

Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
c=0
for i in range(h):
  c=input().count("#")
print("Possible" if c=h+w-1: "Impossible")

Fixed submission:
h,w=map(int,input().split())
c=0
for i in range(h):
  c+=input().count("#")
print("Possible" if c==h+w-1 else "Impossible")
Buggy python submission (verdict: Runtime Error):
A, B, C=map(int(input().split()))
if A+B==C or A+C==B or B+C==A:
    print("YES")
else:
    print("NO")

Fixed submission:
abc = list(map(int, input().split()))
abc.sort(reverse = True)
if abc[0] == abc[1] + abc[2]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A, B, C=map(int(input().split()))
if (A+B+C)%2==0:
    print("YES")
else:
    print("NO")

Fixed submission:
abc = list(map(int, input().split()))
abc.sort(reverse = True)
if abc[0] == abc[1] + abc[2]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
s=int(input())
cnt=0
for i in range(len(s)-1):
  if s[i]!=s[i+1]:
    cnt+=1
print(cnt)

Fixed submission:
s=list(input())
cnt=0
for i in range(len(s)-1):
  if s[i]!=s[i+1]:
    cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[input() for i in range(n)]
t=[input() for j in range(n)]
s.reverse()
l=0
for k  in range(n):
    while s[k]==t[k]:
        l+=1
print(l)

Fixed submission:
N = int(input())
s = input()
t = input()
ans = 2*N
for i in range(N):
    if s[i:] == t[:N-i]:
        ans -= N - i
        break
print(ans)
#コピペです。