Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=0

for i in range(n-k+1):
  ans=max(ans,sum(a[i:i+k]))
  
ans+=k
ans/=2

print(ans)

Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:(x+1)/2,a))

a=[0]+list(itertools.accumulate(a))
ans=0

for i in range(n-k+1):
  ans=max(ans,a[i+k]-a[i])
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(int,input().split()))

q=[]

for i in p:
  q+=[(i+1)/2]

ans=0

for i in range(n-k+1):
  ans=max(ans,sum(q[i:i+k]))
  
print(ans)


Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:(x+1)/2,a))

a=[0]+list(itertools.accumulate(a))
ans=0

for i in range(n-k+1):
  ans=max(ans,a[i+k]-a[i])
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(int,input().split()))

q=[]

for i in p:
  q+=[(i+1)/2]

ans=0

for i in range(n-k+1):
  ans=max(ans,sum(q[i:i+k]))
  
print(ans)


Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:(x+1)/2,a))

a=[0]+list(itertools.accumulate(a))
ans=0

for i in range(n-k+1):
  ans=max(ans,a[i+k]-a[i])
  
print(ans)

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

q=map(lambda x:(x+1)/2,p)

ans=0

for i in range(n-k+1):
  ans=max(ans,sum(q[i,i+k]))
  
print(ans)

Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:(x+1)/2,a))

a=[0]+list(itertools.accumulate(a))
ans=0

for i in range(n-k+1):
  ans=max(ans,a[i+k]-a[i])
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(int,input().split()))
t=[(i+1)/2 for i in p]
a=[]
for i in range(n+1-k):
  a.append(sum(t[i:i+k]))
print(max(a))


Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:(x+1)/2,a))

a=[0]+list(itertools.accumulate(a))
ans=0

for i in range(n-k+1):
  ans=max(ans,a[i+k]-a[i])
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(int,input().split()))
t=[(i+1)/2 for i in p]
a=[]
for i in range(n+1-k):
  a.append(sum(t[i:i+k]))
print(max(a))


Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:(x+1)/2,a))

a=[0]+list(itertools.accumulate(a))
ans=0

for i in range(n-k+1):
  ans=max(ans,a[i+k]-a[i])
  
print(ans)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))
p=map(lambda x:(x+1)/2,p)
a=[]
for i in range(n+1-k):
  a+=[p[i:i+k]]
print(max(a))

Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:(x+1)/2,a))

a=[0]+list(itertools.accumulate(a))
ans=0

for i in range(n-k+1):
  ans=max(ans,a[i+k]-a[i])
  
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
print(math.ceil(int(input())/int(input())))

Fixed submission:
import math
h,a=map(int,input().split())
print(math.ceil(h/a))
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
h=list(map(int,input().split()))
if n<=k:
  print('0')
else:
  h.sort()
  h.pop([n-k:])
  print(sum(h))

Fixed submission:
n,k=map(int,input().split())
h=list(map(int,input().split()))
if n<=k:
  print('0')
else:
  h.sort()
  for i in range(k):
    h.pop()
  print(sum(h))
Buggy python submission (verdict: Runtime Error):
x=(bin(int(input()))
print(2**(len(x)-2)-1)

Fixed submission:
n=int(input())
x=(bin(n))
print(2**(len(x)-2)-1)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
b=[]
cnt=0
for i in a:
  if b==[] or min(b)>=i:
    cnt+=1
    b.append(i)
  else:
    b.append(i)
print(cnt)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=2*10**5
cnt=0
for i in a:
  if b>=i:
    cnt+=1
    b=i

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
b=[]
cnt=0
for i in a:
  if b==[] or min(b)>=i:
    cnt+=1
    b.append(i)
  else:
    b.append(i)

print(cnt)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=2*10**5
cnt=0
for i in a:
  if b>=i:
    cnt+=1
    b=i

print(cnt)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=[]
cnt+0
for i in a:
  if b==[] or min(b)>=i:
    cnt+=1
    b.append(i)
  else:
    b.append(i)
print(cnt)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=2*10**5
cnt=0
for i in a:
  if b>=i:
    cnt+=1
    b=i

print(cnt)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
lst=[list(input().split()) for i in range(m)]
x,y=0,0
cnt=['?']+[0]*n
cnt2=[0]+[0]*n
for i in lst:
  if i[1]=='WA':
    pin=int(i[0])
    if cnt[pin]!='AC':
      cnt2[pin]+=1
  elif i[1]=='AC':
    cnt[int(i[0])]='AC'

x=cnt.count('AC')

for i in range(len(cnt)+1):
  if cnt[i]=='AC':
    y+=cnt2[i]
print(x,y)

Fixed submission:
n,m=map(int,input().split())
lst=[list(input().split()) for i in range(m)]
x,y=0,0
cnt=['?']+[0]*n
cnt2=[0]+[0]*n
for i in lst:
  if i[1]=='WA':
    pin=int(i[0])
    if cnt[pin]!='AC':
      cnt2[pin]+=1
  elif i[1]=='AC':
    cnt[int(i[0])]='AC'

x=cnt.count('AC')

for i in range(len(cnt)):
  if cnt[i]=='AC':
    y+=cnt2[i]
print(x,y)

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
lst=[list(map(int,input().split())) for i in range(m)]
x,y=0,0
cnt=['?']+[0]*n
for i in lst:
  if i[1]=='WA':
    if cnt[i[0]]!='AC':
      y+=1
  elif i[1]=='AC':
    cnt[i[0]]='AC'

x=cnt.count('AC')

print(x,y)

Fixed submission:
n,m=map(int,input().split())
lst=[list(input().split()) for i in range(m)]
x,y=0,0
cnt=['?']+[0]*n
cnt2=[0]+[0]*n
for i in lst:
  if i[1]=='WA':
    pin=int(i[0])
    if cnt[pin]!='AC':
      cnt2[pin]+=1
  elif i[1]=='AC':
    cnt[int(i[0])]='AC'

x=cnt.count('AC')

for i in range(len(cnt)):
  if cnt[i]=='AC':
    y+=cnt2[i]
print(x,y)

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=0
b=0
x=[]
for i in range(m):
  s,t=input().split()
  s=int(s)
  if s not in x:
    if t='AC':
      a+=1
      x.append(s)
    else:
      b+=1
print(a,b)

Fixed submission:
n,m=map(int,input().split())
lst=[list(input().split()) for i in range(m)]
x,y=0,0
cnt=['?']+[0]*n
cnt2=[0]+[0]*n
for i in lst:
  if i[1]=='WA':
    pin=int(i[0])
    if cnt[pin]!='AC':
      cnt2[pin]+=1
  elif i[1]=='AC':
    cnt[int(i[0])]='AC'

x=cnt.count('AC')

for i in range(len(cnt)):
  if cnt[i]=='AC':
    y+=cnt2[i]
print(x,y)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

h,w=map(int,input().split())

maze=[list(input()) for i in range(h)]

ans=0

dx=[1,-1,0,0]
dy=[0,0,1,-1]


for i in range(h):
  for j in range(w):
    for ii in range(h):
      for jj in range(w):
        Q=deque()
        Q.append((i,j,0))
        
        if maze[i][j]=='#' or maze[ii][jj]=='#':
          continue

        dp=[[-1]*w for i in range(h)]

        while Q:
          p=Q.popleft()
          if p[0]==ii and p[1]==jj:
            ans=max(ans,p[2])
            break
          for k in range(4):
            nx=p[0]+dx[k]
            ny=p[1]+dy[k]

            if 0<=nx<h and 0<=ny<w and maze[nx][ny]=='.' and dp[nx][ny]==-1:
              Q.append((nx,ny,p[2]+1))
              dp[nx][ny]=p[2]+1


print(ans)

Fixed submission:
from collections import deque

h,w=map(int,input().split())

maze=[list(input()) for i in range(h)]

ans=0

dx=[1,-1,0,0]
dy=[0,0,1,-1]


for i in range(h):
  for j in range(w):
        Q=deque()
        Q.append((i,j,0))
        
        if maze[i][j]=='#':
          continue

        dp=[[-1]*w for i in range(h)]

        dp[i][j]=0

        while Q:
          p=Q.popleft()
          ans=max(ans,p[2])
          for k in range(4):
            nx=p[0]+dx[k]
            ny=p[1]+dy[k]

            if 0<=nx<h and 0<=ny<w and maze[nx][ny]=='.' and dp[nx][ny]==-1:
              Q.append((nx,ny,p[2]+1))
              dp[nx][ny]=p[2]+1


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

h,w=map(int,input().split())

maze=[list(input()) for i in range(h)]

ans=0

dx=[1,-1,0,0]
dy=[0,0,1,-1]


for i in range(h):
  for j in range(w):
    for ii in range(h):
      for jj in range(w):
        Q=deque()
        Q.append((i,j,0))
        
        if maze[i][j]=='#' or maze[ii][jj]=='#':
          continue

        dp=[[False]*w for b in range(h)]

        while Q:
          p=Q.popleft()
          if p[0]==ii and p[1]==jj:
            ans=max(ans,p[2])
            break
          for k in range(4):
            nx=p[0]+dx[k]
            ny=p[1]+dy[k]

            if 0<=nx<h and 0<=ny<w and maze[nx][ny]=='.' and dp[nx][ny]==False:
              Q.append((nx,ny,p[2]+1))
              dp[nx][ny]=True


print(ans)

Fixed submission:
from collections import deque

h,w=map(int,input().split())

maze=[list(input()) for i in range(h)]

ans=0

dx=[1,-1,0,0]
dy=[0,0,1,-1]


for i in range(h):
  for j in range(w):
        Q=deque()
        Q.append((i,j,0))
        
        if maze[i][j]=='#':
          continue

        dp=[[-1]*w for i in range(h)]

        dp[i][j]=0

        while Q:
          p=Q.popleft()
          ans=max(ans,p[2])
          for k in range(4):
            nx=p[0]+dx[k]
            ny=p[1]+dy[k]

            if 0<=nx<h and 0<=ny<w and maze[nx][ny]=='.' and dp[nx][ny]==-1:
              Q.append((nx,ny,p[2]+1))
              dp[nx][ny]=p[2]+1


print(ans)
Buggy python submission (verdict: Runtime Error):
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
mod=10**9+7
ans=0
a.sort()
a=list(itertools.accumulate(a))
pin=0


lst=[1,1]
for i in range(2,n+10):
  lst.append((lst[-1]*i)%mod)

def combinations(n,r):
  xxx=lst[n]
  xxx*=pow(lst[n-r],mod-2,mod)
  xxx%=mod
  xxx*=pow(lst[r],mod-2,mod)
  xxx%=mod

  return xxx


for i in range(n-k+1):
  pin+=1
  now=n-k+1-i
  ans+=(a[-1]-a[-now-1]-a[now-1])*combinations(pin+k-3,k-2)
  ans%=mod


print(ans)

Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
mod=10**9+7
ans=0
a.sort()
a=list(itertools.accumulate(a))
pin=0


lst=[1,1]
for i in range(2,n+10):
  lst.append((lst[-1]*i)%mod)

def combinations(n,r):
  xxx=lst[n]
  xxx*=pow(lst[n-r],mod-2,mod)
  xxx%=mod
  xxx*=pow(lst[r],mod-2,mod)
  xxx%=mod

  return xxx

if k==1:
    print(0)
    exit()


for i in range(n-k+1):
  pin+=1
  now=n-k+1-i
  ans+=(a[-1]-a[-now-1]-a[now-1])*combinations(pin+k-3,k-2)
  ans%=mod


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
mod=10**9+7
ans=0
a.sort()
pin=0


lst=[1,1]
for i in range(2,n+10):
  lst.append((lst[-1]*i)%mod)

def combinations(n,r):
  xxx=lst[n]
  xxx*=pow(lst[n-r],mod-2,mod)
  xxx%=mod
  xxx*=pow(lst[r],mod-2,mod)
  xxx%=mod

  return xxx


for i in range(n-k+1):
  pin+=1
  now=n-k+1-i
  ans+=(sum(a[-now:])-sum(a[:now]))*combinations(pin+k-3,k-2)
  ans%=mod


print(ans)

Fixed submission:
import itertools

n,k=map(int,input().split())
a=list(map(int,input().split()))
mod=10**9+7
ans=0
a.sort()
a=list(itertools.accumulate(a))
pin=0


lst=[1,1]
for i in range(2,n+10):
  lst.append((lst[-1]*i)%mod)

def combinations(n,r):
  xxx=lst[n]
  xxx*=pow(lst[n-r],mod-2,mod)
  xxx%=mod
  xxx*=pow(lst[r],mod-2,mod)
  xxx%=mod

  return xxx

if k==1:
    print(0)
    exit()


for i in range(n-k+1):
  pin+=1
  now=n-k+1-i
  ans+=(a[-1]-a[-now-1]-a[now-1])*combinations(pin+k-3,k-2)
  ans%=mod


print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[list(map(input().split())) for _ in range(n)]
x=input()
cnt='x'
for i in a:
  if cnt!='x':
    z=int(i[1])
    cnt+=z
  if i[0]==x:
    cnt=0
print(cnt)


Fixed submission:
n=int(input())
a=[(input().split()) for _ in range(n)]
x=input()
cnt='x'
for i in a:
  if cnt!='x':
    z=int(i[1])
    cnt+=z
  if i[0]==x:
    cnt=0
print(cnt)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[list(map(input().split())) for _ in range(n)]
x=input()
cnt='x'
for i in a:
  if cnt!='x':
    z=int(i[1])
    cnt+=z
    if i[0]==x:
      cnt=0
print(cnt)

Fixed submission:
n=int(input())
a=[(input().split()) for _ in range(n)]
x=input()
cnt='x'
for i in a:
  if cnt!='x':
    z=int(i[1])
    cnt+=z
  if i[0]==x:
    cnt=0
print(cnt)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[list(map(input().split())) for _ in range(n)]
x=input()
cnt='x'
for i in a:
  if cnt!='x':
    z=int(i[1])
    cnt+=z
    if i[0]==x:
    cnt=0
print(cnt)

Fixed submission:
n=int(input())
a=[(input().split()) for _ in range(n)]
x=input()
cnt='x'
for i in a:
  if cnt!='x':
    z=int(i[1])
    cnt+=z
  if i[0]==x:
    cnt=0
print(cnt)
Buggy python submission (verdict: Runtime Error):
import itertools
n=int(input())
a=tuple(map(int,input().split()))
b=tuple(map(int,input().split()))
lst=[i for i in itertools.permutations(range(1,n+1))]
cnt=0
for i in lst:
  if a==i:
    a=cnt
  elif b==i:
    b=cnt
  cnt+=1
print(abs(a-b))

Fixed submission:
import itertools
n=int(input())
a=tuple(map(int,input().split()))
b=tuple(map(int,input().split()))
lst=[i for i in itertools.permutations(range(1,n+1))]
cnt=0
for i in lst:
  if a==i:
    a=cnt
  if b==i:
    b=cnt
  cnt+=1
print(abs(a-b))

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c,d=0,0
def kaijyou(x):
  y=1
  for i in range(1,x+1):
    y*=i
  return y
for i in range(n):
  c+=kaijyou(n-i-1)*(max(0,a[i]-1))
for i in range(n):
  d+=kaijyou(n-i-1)*(max(0,b[i]-1))
print(abs(a-b))

Fixed submission:
import itertools
n=int(input())
a=tuple(map(int,input().split()))
b=tuple(map(int,input().split()))
lst=[i for i in itertools.permutations(range(1,n+1))]
cnt=0
for i in lst:
  if a==i:
    a=cnt
  if b==i:
    b=cnt
  cnt+=1
print(abs(a-b))

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
total1=0
total2=0
def pon(p):
  s=1
  for i in range(1,p+1):
  s*=i
  return s
x=1
y=1
for i in a:
  total1+=(i-1)*pon(n-x)
  x+=1
for i in b:
  total2+=(i-1)*pon(n-y)
  y+=1
print(abs(total1-total2))

Fixed submission:
import itertools
n=int(input())
a=tuple(map(int,input().split()))
b=tuple(map(int,input().split()))
lst=[i for i in itertools.permutations(range(1,n+1))]
cnt=0
for i in lst:
  if a==i:
    a=cnt
  if b==i:
    b=cnt
  cnt+=1
print(abs(a-b))
Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if a==k:
  print(0,b)

elif a+b<=k:
  print(0,0)

  elif a>k:
  print(a-k,b)
  
else:
  print(0,b+a-k)
  
  
  


Fixed submission:
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
  
else:
  print(0,max(0,a+b-k))

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if a==k:
  print('0',b)

elif (a+b)<k:
  print('0','0')

  elif a>k:
  print(a-k,b)
  
else:
  print('0',b+a-k)
  
  
  


Fixed submission:
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
  
else:
  print(0,max(0,a+b-k))

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if a==k:
  print('0',b)

elif a+b<=k:
  print('0','0')

  elif a>k:
  print(a-k,b)
  
else:
  print('0',b+a-k)
  
  
  


Fixed submission:
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
  
else:
  print(0,max(0,a+b-k))

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if a=k:
  print(a-a,b)
  
elif a>k:
  print(a-k,b)
  
else:
  print(a-a,b+a-k)
  
  


Fixed submission:
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
  
else:
  print(0,max(0,a+b-k))

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if a=k:
  print('0',b)
  
elif a>k:
  print((a-k),b)
  
else:
  print('0',(b+a-k))
  
  


Fixed submission:
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
  
else:
  print(0,max(0,a+b-k))

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if a=k:
  print('0',b)
  
elif a>k:
  print(a-k,b)
  
else:
  print('0',b+a-k)
  
  

Fixed submission:
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
  
else:
  print(0,max(0,a+b-k))
Buggy python submission (verdict: Runtime Error):
x='123'
for _ in range(2): 
  x=x.remove(input())
print(x)

Fixed submission:
x='123'
for _ in range(2): 
  x=x.replace(input(),'')
print(x)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
x=[1,2,3]
x.remove(a)
x.remove(b)
return(*x)


Fixed submission:
x='123'
for _ in range(2): 
  x=x.replace(input(),'')
print(x)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
x=[1,2,3]
x.remove(a)
x.remove(b)
return(x)

Fixed submission:
x='123'
for _ in range(2): 
  x=x.replace(input(),'')
print(x)
Buggy python submission (verdict: Runtime Error):
from math import lcm
a,b=map(int,input().split())
print(lcm(a,b))

Fixed submission:
from fractions import gcd 
a,b=map(int,input().split())
print(a*b//gcd(a,b))
Buggy python submission (verdict: Runtime Error):
s=input()
cnt=0
for i in range(len(s)//2):
  if s[i]!=s[(i*(-1))-1]
  cnt+=1
print(cnt)

Fixed submission:
s=input()
cnt=0
for i in range(len(s)//2):
  if s[i]!=s[(i*(-1))-1]:
    cnt+=1
print(cnt)

Buggy python submission (verdict: Runtime Error):
s=input()
n=len(s)
sum=0

for i in range(n):
  if s(i)!=s(n-i-1):
    sum+=1
    print(sum//2)


Fixed submission:
s=input()
cnt=0
for i in range(len(s)//2):
  if s[i]!=s[(i*(-1))-1]:
    cnt+=1
print(cnt)

Buggy python submission (verdict: Runtime Error):
s=input()
n=len(s)
sum=0

for i in range(n):
  if s(i)!=s(n-i):
    sum+=1
    print(sum//2)

Fixed submission:
s=input()
cnt=0
for i in range(len(s)//2):
  if s[i]!=s[(i*(-1))-1]:
    cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=:(
for i in range(1,n):
  if int((i*1.08)//1)==n:
    ans=i
    break
print(ans)

Fixed submission:
n=int(input())
ans=':('
for i in range(1,n+1):
  if int((i*1.08)//1)==n:
    ans=i
    break
print(ans)
Buggy python submission (verdict: Runtime Error):
x=int(input())
if x>=2100:
  print(1)
  exit()

ans=[0]*2100
for a in range(22):
  for b in range(22):
    for c in range(22):
      for d in range(22):
        for e in range(22):
          for f in range(21):
            ans[a*100+b*101+c*102+d*103+e*104+f*105]=1
            
print(ans[x])
            


Fixed submission:
x=int(input())
if x>=2100:
  print(1)
  exit()

ans=[0]*2100
for a in range(22):
  for b in range(22):
    for c in range(22):
      for d in range(22):
        for e in range(22):
          for f in range(21):
            y=a*100+b*101+c*102+d*103+e*104+f*105
            if y<=2099:
              ans[y]=1
            
print(ans[x])

Buggy python submission (verdict: Runtime Error):
x=int(input())
if x>=2100:
  print(1)
  exit()

ans=[0]*2100
for a in range(22):
  for b in range(22):
    for c in range(22):
      for d in range(22):
        for e in range(22):
          for f in range(21):
            ans[a*100+b*101+c*102+d*103+e*104+f*105]=1
            
print(ans(x))
            

Fixed submission:
x=int(input())
if x>=2100:
  print(1)
  exit()

ans=[0]*2100
for a in range(22):
  for b in range(22):
    for c in range(22):
      for d in range(22):
        for e in range(22):
          for f in range(21):
            y=a*100+b*101+c*102+d*103+e*104+f*105
            if y<=2099:
              ans[y]=1
            
print(ans[x])
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
ans='No'
if n%2==0:
  if s[:n//2]=s[n//2:]:
    ans='Yes'
print(ans)

Fixed submission:
n=int(input())
s=input()
ans='No'
if n%2==0:
  if s[:n//2]==s[n//2:]:
    ans='Yes'
print(ans)

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

if n%2==0:
  if s[:(n//2)]==s[(n//2):n]:
    print('Yes')
  else:
    print('No')
    
else('No')


Fixed submission:
n=int(input())
s=input()
ans='No'
if n%2==0:
  if s[:n//2]==s[n//2:]:
    ans='Yes'
print(ans)

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

if n%2==0:
  if s[:n//2]==s[n//2:n]:
    print('Yes')
  else:
    print('No')
    
else('No')

Fixed submission:
n=int(input())
s=input()
ans='No'
if n%2==0:
  if s[:n//2]==s[n//2:]:
    ans='Yes'
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[input().split() for i in range(n)]
x=0
y=1
for i in a:
  for j in a:
    x+=pow((i[0]-j[0])**2+(i[1]-j[1])**2,0.5)
for k in range(1,n+1):
  y*=k
print(x/y)

Fixed submission:
import itertools
n=int(input())
lst=[list(map(int,input().split())) for i in range(n)]
per=[i for i in itertools.permutations(range(n))]
ans=0
for i in per:
  for j in range(n-1):
    ans+=pow((lst[i[j]][0]-lst[i[j+1]][0])**2+(lst[i[j]][1]-lst[i[j+1]][1])**2,0.5)
print(ans/len(per))
Buggy python submission (verdict: Runtime Error):
mod=10**9+7

x,y=map(int,input().split())
if (x+y)%3!=0:
  print(0)
  exit()
  
z=(x+y)//3

x-=z
y-=z

n=x+y
r=x


lst=[0]+[1]
for i in range(2,n+10):
  lst.append((lst[-1]*i)%mod)


xxx=lst[n]
xxx*=pow(lst[n-r],10**9+5,mod)
xxx%=mod
xxx*=pow(lst[r],10**9+5,mod)
xxx%=mod

print(xxx)

Fixed submission:
mod=10**9+7

x,y=map(int,input().split())
if (x+y)%3!=0:
  print(0)
  exit()
  
if x*2<y or y*2<x:
  print(0)
  exit()
  
z=(x+y)//3

x-=z
y-=z

n=x+y
r=x

if x==0 or y==0:
  print(1)
  exit()
  

lst=[0]+[1]
for i in range(2,n+10):
  lst.append((lst[-1]*i)%mod)


xxx=lst[n]
xxx*=pow(lst[n-r],10**9+5,mod)
xxx%=mod
xxx*=pow(lst[r],10**9+5,mod)
xxx%=mod

print(xxx)

Buggy python submission (verdict: Runtime Error):
mod=10**9+7

x,y=map(int,input().split())
if (x+y)%3!=0:
  print(0)
  exit()
  
z=(x+y)//3

x-=z
y-=z

n=x+y
r=x

xxx=lst[n]
xxx*=pow(lst[n-r],10**9+5,mod)
xxx%=mod
xxx*=pow(lst[r],10**9+5,mod)
xxx%=mod

print(xxx)



Fixed submission:
mod=10**9+7

x,y=map(int,input().split())
if (x+y)%3!=0:
  print(0)
  exit()
  
if x*2<y or y*2<x:
  print(0)
  exit()
  
z=(x+y)//3

x-=z
y-=z

n=x+y
r=x

if x==0 or y==0:
  print(1)
  exit()
  

lst=[0]+[1]
for i in range(2,n+10):
  lst.append((lst[-1]*i)%mod)


xxx=lst[n]
xxx*=pow(lst[n-r],10**9+5,mod)
xxx%=mod
xxx*=pow(lst[r],10**9+5,mod)
xxx%=mod

print(xxx)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[]
for x in range(1,10):
  for y in range(1,10):
    a=a.append(x*y)
if n in a:
  print('Yes')
else:
  print('No')


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

Buggy python submission (verdict: Runtime Error):
a,b=(int,input().split())
if a<10 and b<10:
  print(a*b)
  
else:
  print('-1')


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

Buggy python submission (verdict: Runtime Error):
a,b=(int,input().split())
if a<10 and b<10:
  print(a*b)
  
else:
  print(-1)

Fixed submission:
a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
  
else:
  print('-1')
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[]
for x in range(1,10):
  for y in range(1,10):
    a+=x*y
if n in a:
  print('Yes')
else:
  print('No')

Fixed submission:
n=int(input())
ans='No'
for i in range(1,10):
  if n%i==0:
    if 1<=n//i<=9:
      ans='Yes'
      break
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in a:
  x=i**2
  sum+=x
print((sum(a)**2)-sum)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
aa=0
for i in a:
  x=i**2
  aa+=x
print(((sum(a)**2)-aa)//2)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
c=''
x=0
for i in a:
  x+=1
  b[i-1]=x
for j in b:
  c+=j
  c+=' '
print(c[:-1])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
c=''
x=0
for i in a:
  x+=1
  b[i-1]=x
for j in b:
  c+=str(j)
  c+=' '
print(c[:-1])