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

Fixed submission:
n=int(input())
s=input()
c=0
for i in range(1,n):
  x=set(s[:i])
  y=set(s[i:])
  a = len(x & y)
  if a > c:
    c = a
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,n):
    x, y = S[:i], S[i:]
    c = max(c, len(set(x) & set(y)))
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  a = len(x & y)
  if a > c:
    c = a
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=s[:i]
  y=s[i:]
  a = set(x) & set(y)
  an=len(a)
  if an>c:
    c=an
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  a = x & y
  an=len(a)
  if an>c:
    c=an
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  a=x&y
  an=len(a)
  if an>c:
    c=an
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  a=len(x&y)
  c=max(c,a)
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  len(a)=x&y
  c=max(c,a)
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  a=x&y
  c=max(c,a)
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=s[0:i]
  y=s[i:N]
  for j in range('a','z'+1):
    if j in x and j in y:
      c+=1
print(c)
Problem p03339 (python)

Fixed submission:
n=int(input())
s=input()
count=0
for i in range(1,n):
  if s[i]=='E':
    count+=1
m=count
for i in range(1,n):
  if s[i-1]=='W':
    count+=1
  if s[i]=='E':
    count-=1
  m=min(m,count)
print(m)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input
count=0
for i in range(1,n):
  if s[i]=='E':
    count+=1
m=count
for i in range(1,n):
  if s[i-1]=='W':
    count+=1
  if s[i]=='E':
    count-=1
  m=min(m,count)
print(m)
Problem p03353 (python)

Fixed submission:
s = input()
K = int(input())
N = len(s)

ans = []

for i in range(min(K, N)):
  for j in range(N-i):
    ans.append(s[j:j+i+1])
  
ans.sort()
count = 0
now = '0'
for i in range(len(ans)):
  if ans[i] != now:
    count += 1
    now = ans[i]
    if count == K:
      print(now)
      exit()

Buggy submission (verdict: Runtime Error):
s=input()
k=int(input())
t=set(s)
t.append(s)
n=len(s)-1
for i in range(n):
  t.append(s[i:i+2])
  if i == n:
    break
  t.append(s[i:i+3])
  if i == n-1:
    continue
  t.append(s[i:i+4])
t.sort()
print(t[k])

Buggy submission (verdict: Runtime Error):
s=input()
k=int(input())
t=set(s)
t.append(s)
for i in range(len(s)-1):
  t.append(s[i:i+1])
  if i == len(s)-1:
    break
  t.append(s[i:i+2])
  if i == len(s)-2:
    continue
  t.append(s[i:i+3])
t.sort()
print(t[k])

Buggy submission (verdict: Runtime Error):
s=input()
k=int(input())
t=set(s)
t.append(s)
for i in range(len(s)-1):
  t.append(s[i]+s[i+1])
  if i == len(s)-1:
    break
  t.append(s[i]+s[i+1]+s[i+2])
  if i == len(s)-2:
    continue
  t.append(s[i]+s[i+1]+s[i+2]+s[i+3])
t.sort()
print(t[k])

Buggy submission (verdict: Runtime Error):
s=input()
k=int(input())
t=set(s)
t.apprnd(s)
for i in range(len(s)-1):
  t.append(s[i]+s[i+1])
  if i == len(s)-1:
    break
  t.append(s[i]+s[i+1]+s[i+2])
  if i == len(s)-2:
    continue
  t.append(s[i]+s[i+1]+s[i+2]+s[i+3])
t.sort()
print(t[k])
Problem p03361 (python)

Fixed submission:
H, W = map(int, input().split())

s = ['.'*(W+2)] + ['.'+input()+'.' for _ in range(H)] + ['.'*(W+2)]
for hi in range(1, H+1):
  for wi in range(1, W+1):
    if s[hi][wi] == '.':
      continue
    if s[hi-1][wi]=='.' and s[hi+1][wi]=='.':
      if s[hi][wi-1]=='.' and s[hi][wi+1]=='.':
        print('No')
        exit()
        
print('Yes')

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())

s = ['.'*(W+2)] + ['.'+input()+'.' for _ in range(H)] + ['.'*(W+2)]
for hi in range(1, W+1):
  for wi in range(1, H+1):
    if s[hi][wi] == '.':
      continue
    if s[hi-1][wi]=='.' and s[hi+1][wi]=='.':
      if s[hi][wi-1]=='.' and s[hi][wi+1]=='.':
        print('No')
        exit()
        
print('Yes')

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
s=[]
white=[]
for i in range(w):
  white.append(".")
s.append(white)
for i in range(h):
  a=[]
  a.append(".")
  for j in range(w):
    wh=list(map(int,input().split()))
    a.append(wh)
  a.append(".")
s.append(white)

for i in range(1,h+1):
  for j in range(1,w+1):
    if s[w-1][h]=="." and s[w+1][h]=="." and s[w][h-1]=="." and s[w][h+1]=="."
      print("No")
      exit()
print("Yes")
Problem p03380 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
alarge=a[n-1]
if a[0]>=alarge/2:
  asmall=a[0]
else:
  j=0
  while a[j]<alarge/2:
    j+=1
  if alarge<=a[j-1]+a[j]:
    asmall=a[j-1]
  else:
    asmall=a[j]
print("{} {}".format(alarge,asmall))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort()
mx=0
alarge=a[n-1]
if a[0]>=alarge/2:
  asmall=0
  comb=1
  for i in range(1,asmall+1): comb*=alarge-i+1
  for i in range(1,asmall+1): comb/=i
else:
  j=0
  while a[j]<alarge/2:
    j+=1
  if alarge<=a[j-1]+a[j]:
    asmall=a[j-1]
  else:
    asmall=a[j]
  comb=1
  for i in range(1,asmall+1): comb*=alarge-i+1
  for i in range(1,asmall+1): comb/=i
print("{} {}".format(alarge,asmall))
Problem p03402 (python)

Fixed submission:
a,b=map(int,input().split())
k=32
m=2*k
grid=[['#' for i in range(m)] for i in range(k)]
grid=grid+[['.' for i in range(m)] for i in range(k)]

for i in range(m*k):
  if a==1:
    break
  grid[2*int(i*2/m)][(i*2)%m]='.'
  a-=1

for i in range(m*k):
  if b==1:
    break
  grid[k+1+2*int(i*2/m)][(i*2)%m]='#'
  b-=1

print(str(2*k)+' '+str(2*k))
for i in range(k*2):
  print(''.join(grid[i]))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
grid=[['#' for i in range(60)] for i in range(20)]
grid=grid+[['.' for i in range(60)] for i in range(20)]

for i in range(1200):
  amari=i%60
  shou=int(i/60)
  if (amari + shou)%2==0:
    grid[shou][amari]='.'
    a-=1
  if a==1:
    break

for i in range(1200):
  if (amari + shou)%2==0:
    grid[shou+22][amari]='#'
    b-=1
  if b==1:
    break

for i in range(40):
  print(''.join(grid[i]))
Problem p03408 (python)

Fixed submission:
N = int(input())
worddict = {}
for i in range(N):
  s = input()
  if s in worddict:
    worddict[s] += 1
  else:
    worddict[s] = 1
    
M = int(input())
for i in range(M):
  t = input()
  if t in worddict:
    worddict[t] -= 1
    
maxyen = 0
for i in worddict:
  maxyen = max(maxyen, worddict[i])
print(maxyen)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[]
t=[]
for i in range(n):
  s.append(input())
m=int(input())
for i in range(m):
  t.append(input())
max=0
for i in range(len(s)):
  get=0
  for j in range(len(s[i:n])):
    if s[i]==s[j]:
      get+=1
  for k in range(len(t)):
    if s[i]==s[k]:
      get-=1
  if get>max:
    max=get
print(max)
Problem p03418 (python)

Fixed submission:
n,k=map(int,input().split())
c=0
if k==0:
 print(n**2)
else:
  for b in range(k,n+1):
    p=int(n/b)
    r=n%b
    c+=(b-k)*p
    if r>=k:
      c+=r-k+1
  print(c)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
c=0
for b in range(k,n+1):
  p=int(n/b)
  r=n%b
  c+=(b-k)*p
  if r>=k:
    c+=r-k+1
if k==0:
  print(c-1)
else:
  print(c)
Problem p03425 (python)

Fixed submission:
N = int(input())

march = 'MARCH'
mdict = {s:0 for s in march}

for i in range(N):
  S = input()
  if S[0] in march:
    mdict[S[0]] += 1
  
lst = [mdict[key] for key in mdict]
ans = 0
for i in range(3):
  for j in range(i+1, 4):
    for k in range(j+1, 5):
      ans += lst[i] * lst[j] * lst[k]
      
print(ans)

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

march = 'MARCH'
mdict = {s:0 for s in march}

for i in range(N):
  S = input()
  mdict[S[0]] += 1
  
lst = [mdict[key] for key in mdict]
ans = 0
for i in range(3):
  for j in range(i+1, 4):
    for k in range(j+1, 5):
      ans += lst[i] * lst[j] * lst[k]
      
print(ans)
Problem p03501 (python)

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

Buggy submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
print(mint(N*A, B))
Problem p03502 (python)

Fixed submission:
S = input()
N = int(S)
fN = sum([int(si) for si in S])
if N%fN == 0:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
S = input()
N = int(input())
fN = sum([int(S[i]) for i in range(len(S))])
if N%fN == 0:
  print('Yes')
else:
  print('No')
Problem p03549 (python)

Fixed submission:
N, M = map(int, input().split())
print((1900*M+100*(N-M))*(2**M))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
print((1900*M+100*(N-M))2**M)
Problem p03564 (python)

Fixed submission:
N = int(input())
K = int(input())
now = 1
for i in range(N):
  if now <= K:
    now *= 2
  else:
    now += K
print(now)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
now = 1
for i in range(N):
  if now <= K:
    now += 2
  else:
    now += K
print(ans)
Problem p03625 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()
max1=0;max2=0
count=0
for i in range(n-3):
  if a[i]==a[i+1]:
    max1=a[i]
    a[i+1]=0
    count=i+1
    break
if count==0:
  print(0)
  exit()
for j in range(count,n-1):
  if a[j]==a[j+1]:
    max2=a[j]
    break
print(max1*max2)

Buggy submission (verdict: Runtime Error):
N = input()
A = list(map(int, input().split()))
A.sort(reverse=True)

now = A[0]
tateyoko = [0, 0]
count = 0
nowflag = False
for i in range(1, N):
  if (A[i] == now) and !nowflag:
    tateyoko[count] = now
    count += 1
    nowflag = True
  else:
    nowflag = False
  if count == 2:
    break
  now = A[i]
  
print(tateyoko[0] * tateyoko[1])

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()
max1=0;max2=0
for i in range(n-3):
  if a[i]==a[i+1]:
    max1=a[i]
    a[i+1]=0
    count=i+1
    break
for j in range(count,n-1):
  if a[j]==a[j+1]:
    max2=a[j]
    break
print(max1*max2)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()
max1=0;max2=0
for i in range(n-1):
  if a[i]==a[i+1]:
    max1=a[i]
    a[i+1]=0
    count=i
    break
for j in range(count,n-1):
  if a[j]==a[j+1]:
    max2=a[j]
    break
print(max1*max2)
Problem p03694 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
a.sort()
print(a[-1]-a[0])

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split())).sort()
print(a[-1]-a[0])
Problem p03729 (python)

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

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if (A[-1]==B[0]) and (B[-1]==C[0]):
  print('YES')
else:
  print('NO')
Problem p03773 (python)

Fixed submission:
A, B = map(int, input().split())
print((A+B) % 24)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
student = [list(map(int, input().split())) for _ in range(N)]
cp = [list(map(int, input().split())) for _ in range(M)]

idou = []
for a, b in student:
  idousaki = -1
  nearest = 1000000000
  for i, x, y in enumerate(cp):
    d = abs(x-a) + abs(y-b)
    if d < nearest:
      nearest = d
      idousaki = i+1
      
  idou.append(idousaki)
  
for i in idou:
  print(i)
Problem p03814 (python)

Fixed submission:
s = input()
N = len(s)
for i in range(N):
  if s[i] == 'A':
    left = i
    break
    
for i in range(N):
  if s[N-1-i] == 'Z':
    right = N-1-i
    break
    
print(right - left + 1)

Buggy submission (verdict: Runtime Error):
s = input()
for i in range(len(s)):
  if s[i] == 'A':
    left = i
    break
    
for i in range(len(s)):
  if s[N-1-i] == 'Z':
    right = N-1-i
    break
    
print(right - left + 1)

Buggy submission (verdict: Runtime Error):
s = input()
for i in range(N):
  if s[i] == 'A':
    left = i
    break
    
for i in range(N):
  if s[N-1-i] == 'Z':
    right = N-1-i
    
print(right - left + 1)
Problem p03853 (python)

Fixed submission:
H, W = map(int, input().split())
C = [input() for _ in range(H)]
for i in range(2*H):
  print(C[i//2])

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
C = [input() for _ in range(H)]
for i in raneg(2*H):
  print(C[i//2])

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
C = [input() for _ in range(H)]
for i in raneg(2*H):
  print(C[i//2 +1])
Problem p03862 (python)

Fixed submission:
n,x=map(int,input().split())
a=list(map(int,input().split()))
eat=0
for i in range(n-1):
  wa=a[i]+a[i+1]
  if wa>x:
    sa=wa-x
    eat+=sa
    if sa<=a[i+1]:
      a[i+1]-=sa
    else:
      a[i+1]=0
print(eat)

Buggy submission (verdict: Runtime Error):
s=input()
n=len(s)
if s[0]==s[-1] ^ n%2==0:
  print('Second')
else:
  print('First')
Problem p03863 (python)

Fixed submission:
s=input()
n=len(s)
moji1=s[0]
moji2=s[1]
count=0
flag=False
for i in range(n-2):
  if (i+count)%2==0:
    if s[i+2]!=moji1:
      count+=1
      if i+2==n-1:
        flag=True
  else:
    if s[i+2]!=moji2:
      count+=1
      if i+2==n-1:
        flag=True
  if count==2:
    break
if count==0:
  print('Second')
  exit()
if count==1:
  if flag:
    if (n-2)%2==0:
      print('Second')
    else:
      print('First')
  else:
    print('First')
  exit()
if s[0]==s[-1]:
  if (n-3)%2==0:
    print('Second')
  else:
    print('First')
else:
  if (n-2)%2==0:
    print('Second')
  else:
    print('First')

Buggy submission (verdict: Runtime Error):
s=input()
n=len(s)
if s[0]==s[-1] ^ n%2==0:
  print('Second')
else:
  print('First')
Problem p03943 (python)

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

Buggy submission (verdict: Runtime Error):
W, H, N = map(int, input().split())

left = 0
right = W
bottom = 0
top = H

for i in range(N):
  x, y, a = map(int, input().split())
  if a == 1:
    left = max(left, x)
  elif a == 2:
    right = min(right, x)
  elif a == 3:
    bottom = max(bottom, y)
  else:
    top = min(top, y)
    
print((right-left) * (top-bottom))
Problem p03998 (python)

Fixed submission:
S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()


next = 'a'
lens = {'a':len(S['a']), 'b':len(S['b']), 'c':len(S['c'])}
counts = {'a':0, 'b':0, 'c':0}

while True:
  now = next
  counts[now]
  if counts[now] == lens[now]:
    print(now.upper())
    exit()
  next = S[now][counts[now]]
  counts[now] += 1

Buggy submission (verdict: Runtime Error):
S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()


next = 'a'
lens = {'a':len(S['a']), 'b':len(S['b']), 'c':len(S['c'])}
counts = {'a':0, 'b':0, 'c':0}

while True:
  now = next
  if counts[now] == lens[now]:
    print(now)
    exit()
  counts[now] += 1
  next = S[now][counts[now]]

Buggy submission (verdict: Runtime Error):
S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()


next = 'a'
lens = {'a':len(S['a']), 'b':len(S['b']), 'c':len(S['c'])}
counts = {'a':0, 'b':0, 'c':0}

while True:
  now = next
  if counts[now] == len[now]:
    print(now)
    exit()
  next = S[now][counts[now]]
  counts[now] += 1

Buggy submission (verdict: Runtime Error):
S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()


next = 'a'
lens = {'a':len(S['a']), 'b':len(S['b']), 'c':len(S['c'])}
counts = {'a':0, 'b':0, 'c':0}

while True:
  if counts[next] == len[next]:
    print(next)
    exit()
  next = S[next][counts[next]]
  counts[next] += 1

Buggy submission (verdict: Runtime Error):
S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()


next = 'a'
lens = {'a':len(S[0]), 'b':len(S[1]), 'c':len(S[2])}
counts = {'a':0, 'b':0, 'c':0}

while True:
  if counts[next] == len[next]:
    print(next)
    exit()
  next = S[next][counts[next]]
  counts[next] += 1

Buggy submission (verdict: Runtime Error):
S = [input() for _ in range(3)]

next = 0
lens = [len(i) for i in S]
counts = [0]*3

while True:
  if counts[next] == len[next]:
    if next == 0:
      print('a')
    elif next == 1:
      print('b')
    else:
      print('c')
    exit()
  next = S[next][counts[next]]
  counts[next] += 1
Problem p04011 (python)

Fixed submission:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
print(min(K, N)*X + max(0, N-K)*Y)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
print(min(K, N)*X + max(0, N-K)*Y
Problem p04013 (python)

Fixed submission:
n,a=map(int,input().split())
x=list(map(int,input().split()))
y=[i-a for i in x]
y.sort()

ma=max(max(y),-1*min(y))*n
ny=ma*2
dp=[[0]*(ny+1) for _ in range(n+1)]
for i in range(n+1):
  for j in range(ny+1):
    if i==0 and j==ma:
      dp[i][j]=1
    elif i>=1:
      sa=j-y[i-1]
      if sa<0 or sa>ny:
        dp[i][j]=dp[i-1][j]
      else:
        dp[i][j]=dp[i-1][j]+dp[i-1][sa]
print(dp[n][ma]-1)

Buggy submission (verdict: Runtime Error):
n,a=map(int,input().split())
x=list(map(int,input().split()))
y=[i-a for i in x]
y.sort()
minus=[-i for i in y if i<0]
minus.sort()
plus=[i for i in y if i>0]
zero=len([i for i in y if i==0])

ma=max(y)*n
ny=ma*2
dp=[[0]*(ny+1) for _ in range(n+1)]
for i in range(n+1):
  for j in range(ny+1):
    if i==0 and j==ma:
      dp[i][j]=1
    elif i>=1:
      sa=j-y[i-1]
      if sa<0 or sa>ny:
        dp[i][j]=dp[i-1][j]
      else:
        dp[i][j]=dp[i-1][j]+dp[i-1][sa]
print(dp[n][ma]-1)
Problem p04014 (python)

Fixed submission:
n=int(input())
s=int(input())
if n==s:
  print(n+1)
  exit()
if n<s:
  print(-1)
  exit()
for b in range(2,int(n**(1/2))+1):
  m=n
  wa=0
  while m>0:
    wa+=m%b
    m=m//b
  if wa==s:
    print(b)
    exit()

for p in range(int((n-1)**(1/2)),0,-1):
  if (n-s)%p==0:
    b=(n-s)//p+1
    if p+n%b==s:
      print(b)
      exit()
print(-1)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=int(input())
if n==s:
  print(n+1)
  exit()
for b in range(2,int(n**(1/2)+1)):
  m=n
  wa=0
  while m>0:
    wa+=m%b
    m=m//b
  if wa==s:
    print(b)
    exit()

for p in range(int(n**(1/2)),0,-1):
  if (n-s)%p==0:
    b=(n-s)//p+1
    if p+n%b==s:
      print(b)
      exit()
print('-1')

Buggy submission (verdict: Runtime Error):
n=int(input())
s=int(input())
if n==s:
  print(n+1)
  exit()
for b in range(2,int(n**(1/2))+1):
  m=n
  wa=0
  while m>0:
    wa+=m%b
    m=m//b
  if wa==s:
    print(b)
    exit()

for p in range(int(n**(1/2)),0,-1):
  if (n-s)%p==0:
    b=(n-s)//p+1
    if p+n%b==s:
      print(b)
      exit()
print(-1)
Problem p03470 (python)

Fixed submission:
n=int(input())
L=[int(input()) for i in range(n)]
print(len(set(L)))

Buggy submission (verdict: Runtime Error):
n=int(input())
L=[int(input()) for i in range(n)]
print(len(set(A)))
Problem p02657 (python)

Fixed submission:
a, b = map(int, input().split())
print(int(a*b))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if int(a), int(b) in range(1, 100):
    print(a*b)

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

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

Buggy submission (verdict: Runtime Error):
a, b = int(input()), int(input())
print(a*b)
Problem p02795 (python)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())
h = max(h, w)
print((n -1) // h + 1)

Buggy submission (verdict: Runtime Error):
h = input()
w = input()
n = input()
h = max(h,w)
print(n // h)
Problem p03101 (python)

Fixed submission:
H, W = map(int, input().split(" "))
h, w = map(int, input().split(" "))

result = H * W - (h * W + w * (H - h))

print (result)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split(" "))
A_list = []
B_list = []
total = 0

for i in range(N):
    A, B = map(int, input().split(" "))
    A_list.append(A)
    B_list.append(B)

z = list(zip(A_list, B_list))
z.sort()

for a, b in z:
    if b > M:
        total += M * a
        break
    else:
        total += b * a
        M -= b

print(total)
Problem p03103 (python)

Fixed submission:
N, M = map(int, input().split(" "))
A_list = []
B_list = []
total = 0

for i in range(N):
    A, B = map(int, input().split(" "))
    A_list.append(A)
    B_list.append(B)

z = list(zip(A_list, B_list))
z.sort()

for a, b in z:
    if b > M:
        total += M * a
        break
    else:
        total += b * a
        M -= b

print(total)

Buggy submission (verdict: Runtime Error):
 N, M = map(int, input().split(" "))
A_list = []
B_list = []
total = 0

for i in range(N):
    A, B = map(int, input().split(" "))
    A_list.append(A)
    B_list.append(B)

z = list(zip(A_list, B_list))
z.sort()

for a, b in z:
    if b > M:
        total += M * a
        break
    else:
        total += b * a
        M -= b

print(total)
Problem p02767 (python)

Fixed submission:
def resolve():
    import numpy as np
    n=int(input())
    x_base=list(map(int,input().split()))
    x_base.sort()
    x=np.array(x_base)
    ans=10**10
    for i in range(x[0],x[-1]+1):
        if sum((x-i)**2) <=ans:
            ans=sum((x-i)**2)
    print(ans)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    import numpy as np
    n=int(input())
    x_base=list(map(int,input().split()))
    x_base.sort()
    x=np.array(x_base)
    ans=10**10
    for i in range(x[0],x[-1]+1):
        if sum((x-i)**2) <=ans:
            ans=sum((x-i)**2)
    print(ans)
resolve()
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=input()
if n==m:
  print("Yes")
else:
  print("No")
Problem p02993 (python)

Fixed submission:
s=int(input())

b=int(s%1000)
a=int((s-b)/1000)
d=int(b%100)
c=int((b-d)/100)
f=int(d%10)
e=int((d-f)/10)

if a==c or c==e or e==f :
    print("Bad")
else:
    print("Good")

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

b=int(s%1000)
a=int((s-b)/1000)
d=int(b%100)
c=int((b-d)/100)
f=int(d%10)
e=int((d-f)/10)

if a=d or d=e or e=f :
    print("Bad")
else:
    print("Good")
Problem p03447 (python)

Fixed submission:
xab=[]
for _ in range(3):
  xab.append(int(input()))
x=xab[0]
a=xab[1]
b=xab[2]
x=x-a
print(x%b)

Buggy submission (verdict: Runtime Error):
#define
a=int(input())
b=int(input())
c=int(input())
x=int(input())

count=0

#sorting
for e in range(0,a+1):
    if e*500 >= x:
        y=x-e*500
        for f in range(0,b+1):
            if f*100 >= y:
                z=y-100*f
                for g in range(0,c+1):
                    if g*50 == z :                                            
                        count = count +1
                        
                       
print(count)