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

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

x = []
y = []
z = []
for i in range(n):
  _x, _y, _z = map(int, input().split())
  x.append(_x)
  y.append(_y)
  z.append(_z)

pm = [1, -1]

ans = 0
for i_x in pm:
  for i_y in pm:
    for i_z in pm:
      values = []
      for i in range(n):
        values.append(x[i] * i_x + y[i] * i_y + z[i] * i_z)
      s = 0
      for value in sorted(values, reverse=True)[:m]:
        s += value
      ans = max(ans, s)
      
print(ans)

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

x = []
y = []
z = []
for i in range(n):
  _x, _y, _z = map(int, input().split())
  x.append(_x)
  y.append(_y)
  z.append(_z)

pm = [1, -1]

ans = 0
for i_x in pm:
  for i_y in pm:
    for i_z in pm:
      values = []
      for i in range(n):
        values.append(x * i_x + y * i_y + z * i_z)
      s = 0
      for value in sorted(values, reverse=True)[:m]:
        s += value
      ans = max(ans, s)
      
print(ans)
Problem p02580 (python)

Fixed submission:
import bisect
horigin,worigin,m = map(int,input().split())
dich = {}
dicw = {}
 
havew = {}
for _ in range(m):
    h,w = map(int,input().split())
    if h in dich:
        dich[h] += 1
        havew[h].append(w)
    else:
        dich[h] = 1
        havew[h] = [w]
    if w in dicw:
        dicw[w] += 1
    else:
        dicw[w] = 1
 
dichi = list(dich.items())
dichi.sort(reverse=True, key=lambda x:x[1])
dicwi = list(dicw.items())
dicwi.sort(reverse=True, key=lambda x:x[1])
 
# print(havew)
#
# print(dichi)
# print(dicwi)
 
hmax = dichi[0][1]
wmax = dicwi[0][1]
 
for hs in dichi:
    if hs[1] != hmax:
        break
    wlis = sorted(havew[hs[0]])
    for ws in dicwi:
        if ws[1] != wmax:
            break
        idx = bisect.bisect_left(wlis, ws[0])
        if idx >= len(wlis):
            print(hmax+wmax)
            exit()
        if ws[0] != wlis[idx]:
            print(hmax+wmax)
            exit()
print(hmax+wmax-1)

Buggy submission (verdict: Runtime Error):
import bisect
horigin,worigin,m = map(int,input().split())
dich = {}
dicw = {}
 
havew = {}
for _ in range(m):
    h,w = map(int,input().split())
    if h in dich:
        dich[h] += 1
        havew[h].append(w)
    else:
        dich[h] = 1
        havew[h] = [w]
    if w in dicw:
        dicw[w] += 1
    else:
        dicw[w] = 1
 
dichi = list(dich.items())
dichi.sort(reverse=True, key=lambda x:x[1])
dicwi = list(dicw.items())
dicwi.sort(reverse=True, key=lambda x:x[1])
 
# print(havew)
#
# print(dichi)
# print(dicwi)
 
hmax = dichi[0][1]
wmax = dicwi[0][1]
 
for hs in dichi:
    if hs[1] != hmax:
        break
    wlis = sorted(havew[hs[0]])
    for ws in dicwi:
        if ws[1] != wmax:
            break
        idx = bisect.bisect_left(wlis, ws[0])
        if ws[0] != wlis[idx]:
            print(hmax+wmax)
            exit()
print(hmax+wmax-1)

Buggy submission (verdict: Runtime Error):
horigin,worigin,m = map(int,input().split())
dich = {}
dicw = {}

havew = {}
for _ in range(m):
    h,w = map(lambda x: int(x)-1,input().split())
    if h in dich:
        dich[h] += 1
    else:
        dich[h] = 1
        havew[h] = [False] * worigin
    havew[h][w] = True
    if w in dicw:
        dicw[w] += 1
    else:
        dicw[w] = 1

dichi = list(dich.items())
dichi.sort(reverse=True, key=lambda x:x[1])
dicwi = list(dicw.items())
dicwi.sort(reverse=True, key=lambda x:x[1])

# print(havew)
#
# print(dichi)
# print(dicwi)

hmax = dichi[0][1]
wmax = dicwi[0][1]

for hs in dichi:
    if hs[1] != hmax:
        break
    for ws in dicwi:
        # print(hs, ws)
        if ws[1] != wmax:
            break
        if not havew[hs[0]][ws[0]]:
            print(hmax+wmax)
            exit()
print(hmax+wmax-1)
Problem p02693 (python)

Fixed submission:
k = int(input())
a,b = map(int,input().split())
for i in range(a, b+1):
  if i % k == 0:
    print("OK")
    exit()
print("NG")

Buggy submission (verdict: Runtime Error):
k = int(input())
a,b = map(int,input().split())
for i in range(a, b+1):
	if i % k == 0:
    	print("OK")
        exit()
print("NG")

Buggy submission (verdict: Runtime Error):
k = int(input())
a,b = map(int,input().split())
for i in range(a, b+1):
	if k % i == 0:
    	print("OK")
        exit()
print("NG")
Problem p02831 (python)

Fixed submission:
from fractions import gcd
a, b = map(int,input().split())
print(a * b // gcd(a,b))

Buggy submission (verdict: Runtime Error):
from math import gcd
a, b = map(int,input().split())
print(a * b // gcd(a,b))
Problem p03013 (python)

Fixed submission:
import math
from collections import deque

memo = deque([1, 2])
floor = 1
def search(x):
    global memo, floor
    while x > floor:
        memo.append(memo[-1] + memo[-2])
        floor += 1
    return memo[x-1]

CONST = 1000000007
n,m = map(int,input().split())
lis = []
prev = -1
for _ in range(m):
    a = int(input())
    if prev + 1 == a:
        print(0)
        exit()
    lis.append(a-prev-2)
    prev = a
lis.append(n-prev-1)


ans = 1
for v in lis:
    if v == 0: continue
    ans = (ans * search(v)) % CONST
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
n, m = map(int, input().split())

sys.setrecursionlimit(10**5)

breakstep = []

for _ in range(m):
    breakstep.append(int(input()))

sl = [-1 for _ in range(n+1)]

def solve(i):
    if sl[i] == -1:
        if i in breakstep:
            sl[i] = 0
        elif i in [0, 1]:
            sl[i] = 1
        else:
            sl[i] = (solve(i-1) + solve(i-2)) % 1000000007
    return sl[i]

print(solve(n))

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

breakstep = []

for _ in range(m):
    breakstep.append(int(input()))

sl = [-1 for _ in range(n+1)]
def solve(i):
    if sl[i] == -1:
        if i in breakstep:
            sl[i] = 0
        elif i in [0, 1]:
            sl[i] = 1
        else:
            sl[i] = (solve(i-1) + solve(i-2)) % 1000000007
    return sl[i]

print(solve(n))
Problem p03042 (python)

Fixed submission:
s = input()
p = int(s[:2])
a = int(s[2:])

if 0 < p < 13 and 0 < a < 13:
    print("AMBIGUOUS")
elif 0 < p < 13 and 0 <= a < 100:
    print("MMYY")
elif 0 <= p < 100 and 0 < a < 13:
    print("YYMM")
else:
    print("NA")

Buggy submission (verdict: Runtime Error):
s = input()
p = int(s[:2])
a = int(s[2:])

if 0 < p < 13 and 0 < a < 13:
    print("AMBIGUOUS")
elif 0 < p < 13 and 0 < a < 100:
    print("MMYY")
elif 0 < p < 100 and 0 < a < 13:
    print("YYMM")
else p == 0 or a == 0 or p > 12 and a > 12:
    print("NA")
Problem p03208 (python)

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

lis = []

for _ in range(n):
    lis.append(int(input()))

lis.sort()

min = 10**10
for i in range(len(lis)-k+1):
    dist = lis[i+k-1] - lis[i]
    if min > dist: min = dist
print(min)

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

lis = []

for _ in range(n):
    lis.append(int(input())

lis.sort()

min = 10**10
for i in range(len(lis)-k+1):
    dist = lis[i+k-1] - lis[i]
    if min > dist: min = dist
print(min)
Problem p03329 (python)

Fixed submission:
n = int(input())

r = n

for i in range(n+1):
    cnt = 0
    nine = n - i
    while i > 0:
        cnt += i % 6
        i = i // 6
    while nine > 0:
        cnt += nine % 9
        nine = nine // 9
    if r > cnt: r = cnt

print(r)

Buggy submission (verdict: Runtime Error):
money = int(input())
six = 1
nine = 1
now = 1
kingaku = [1]
while money > now:
    if pow(6,six) < pow(9,nine):
        now = pow(6,six)
        six += 1
    else:
        now = pow(9,nine)
        nine += 1
    kingaku.append(now)
kingaku.pop()
count = 0
def check(money, lis, idx, count):
    m = lis[idx]
    if money < 0:
        return 1000000
    if idx < 0:
        return count
    if idx == 0:
        return count + money
    if money < m:
        return check(money, lis, idx-1, count)
    sho = money // m
    mini = 1000000
    for i in range(sho + 1):
        value = check(money-m*i, lis, idx-1, count+i)
        if value < mini:
            mini = value
    return mini
print(check(money, kingaku, len(kingaku)-1, 0))
Problem p03745 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
if n < 3:
    print(1)
    exit(0)
cnt = 1

increase = a[1] - a[0];
for i in range(2, len(a)):
    new_inc = a[i] - a[i-1];
    if increase * new_inc < 0:
        cnt += 1
        increase = 0
    elif increase == 0:
        increase = new_inc
print(cnt)

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

cnt = 1

increase = a[1] - a[0];
for i in range(2, len(a)):
    new_inc = a[i] - a[i-1];
    if increase * new_inc < 0:
        cnt += 1
        increase = 0
    elif increase == 0:
        increase = new_inc
print(cnt)
Problem p02912 (python)

Fixed submission:
from heapq import heappush, heappop, heapify

def main():
  N, M = map(int, input().split())
  A = list(map(int, input().split()))

  if N == 1: A[0] = A[0] // 2 ** M
  else:
    for i in range(N): A[i] *= -1

    heapify(A)

    for i in range(M):
      a = heappop(A)
      heappush(A, -(-a//2))

  print(-sum(A))  
  
if __name__ == '__main__':
  main()

Buggy submission (verdict: Runtime Error):
from bisect import insort_left

def main():
  N, M = map(int, input().split())
  A = sorted(list(map(int, input().split())))

  if M < N: 
    ans = sum(A[:N-M])
    A = A[N-M:]
  else: ans = 0

  if not len(A)-1: A[0] //= 2 ** M
  else:
    while M:
        a = A.pop(N-1)

        while a >= A[-1] and M:
            a //= 2
            M -= 1

        insort_left(A, a)

  print(ans + sum(A))

if __name__ == '__main__':
  main()
Problem p02990 (python)

Fixed submission:
N, K = list(map(int, input().split()))
dp = [[1] + [0 for i in range(K)] for j in range(N+1)]

for i in range(1, N+1):
    for j in range(1, K+1):
        dp[i][j] = dp[i-1][j] + dp[i-1][j-1]

for i in range(1, K+1):
    print((dp[N-K+1][i] * dp[K-1][i-1]) % (10**9+7))

Buggy submission (verdict: Runtime Error):
N, K = list(map(int, input().split()))
dp = [[1] + [0 for i in range(K)] for j in range(N-K+2)]

for i in range(1, N-K+2):
    for j in range(1, K+1):
        dp[i][j] = dp[i-1][j] + dp[i-1][j-1]

for i in range(1, K+1):
    print((dp[N-K+1][i] * dp[K-1][i-1]) % (10**9+7))
Problem p03426 (python)

Fixed submission:
H, W, D = map(int, input().split())
px = [0] * (H*W+1)
py = [0] * (H*W+1)
d = [0] * (H*W+1)

for i in range(H):
    A = list(map(int, input().split()))
    for j, a in enumerate(A):
        px[a] = i
        py[a] = j

for i in range(D+1, H*W+1):
    d[i] = d[i-D] + abs(px[i]-px[i-D]) + abs(py[i]-py[i-D])

for i in range(int(input())):
    L, R = map(int, input().split())
    print(d[R]-d[L])

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

a = [0] * (H*W+1)

for i in range(H):
    A = list(map(int, input().split()))
    for j, _ in enumerate(A):
        a[_] = (i+1, j+1)

table = [0] * (H*W)
for i in range(D+1, H*W):
    x, y = a[i]
    x_, y_ = a[i-D]
    table[i] = table[i-D] + abs(x - x_) + abs(y - y_)

for i in range(int(input())):
    L, R = map(int, input().split())
    print(table[R] - table[L])

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

a = [None] * (H*W+1)

for i in range(H):
    A = list(map(int, input().split()))
    for j, _ in enumerate(A):
        a[_] = (i+1, j+1)

table = [0] * (H*W)
for i in range(D+1, H*W):
    x, y = a[i]
    x_, y_ = a[i-D]
    table[i] = table[i-D] + abs(x - x_) + abs(y - y_)

for i in range(int(input())):
    L, R = map(int, input().split())
    print(table[R] - table[L])
Problem p03634 (python)

Fixed submission:
import heapq


N = int(input())
tree = {i+1:[] for i in range(N)}
route = [10**20 for i in range(N+1)]
visited = [False for i in range(N+1)]

for i in range(N-1):
    a, b, c = list(map(int, input().split()))
    tree[a].append((c, b))
    tree[b].append((c, a))

Q, K = list(map(int, input().split()))

route[K], visited[K] = 0, True
queue = tree[K]

while len(queue):
    c, r = heapq.heappop(queue)

    if not visited[r]:
         visited[r], route[r] = True, c
         for cost, next_r in tree[r]:
             if not visited[next_r]:
                 heapq.heappush(queue, (route[r]+cost, next_r))

for i in range(Q):
    x, y = list(map(int, input().split()))
    print(route[x]+route[y])

Buggy submission (verdict: Runtime Error):
import sys
from heapq import heappush, heappop, heapify
input = sys.stdin.readline
    
def dfs(v, c, p=-1):
    dist[v] = c
    for u, d in g[v]:
        if u == p: continue
        dfs(u, c+d, v)

def main():    
    for i in range(N-1):
        a, b, c = map(int, input().split())
        a -= 1; b -= 1
        g[a].append((b, c))
        g[b].append((a, c))
        
    Q, K = map(int, input().split())
    K -= 1
    
    dfs(K, 0)
    
    for i in range(Q):
        x, y = map(int, input().split())
        print(dist[x-1]+dist[y-1])
    
if __name__ == '__main__':
    N = int(input())
    g = [[] for i in range(N)]
    dist = [0] * N
    main()
Problem p02570 (python)

Fixed submission:
d, t, s = list(map(int, input().split()))
if d / t <= s:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
    d, t, s = list(map(int, input().split()))
    if d / t <= s:
      print('Yes')
    else:
      print('No')

Buggy submission (verdict: Runtime Error):
d, t, s = list(map, int(input().split()))
if d / t <= s:
  print('Yes')
else:
  print('No')
Problem p02578 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
max_a_list = [0]*n
max_a_list[0] = a[0]

for i in range(1,n):
  max_a_list[i] = max(max_a_list[i - 1],a[i])
sum_ = 0
for i in range(n):
  if max_a_list[i] > a[i]:
    sum_ += max_a_list[i] - a[i]
print(sum_)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
max_a_list = [0]*n
max_a_list[0] = a[0]

for i in range(1,n):
  max_a_list[i] = max(max_a_list[i - 1],a[i])
sum_ = 0
for i in range(n):
  sum_ += max(max_a_list[i] - a[i], 0)
print(sum_)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
max_a_list = [0]*n
max_a_list[0] = a[0]

for i in range(1,n):
  max_a_list[i] = max(max_a_list[i - 1],a[i])
sum_ = 0
for i in range(n):
  if max_a_list[i] > a[i]:
    sum_ += max_a_list[i] - a[i]
print(sum_)
Problem p02595 (python)

Fixed submission:
n, d = list(map(int, input().split()))
points = []
for i in range(n):
  points.append(list(map(int, input().split())))
  
cnt = 0
import numpy as np
for p in points:
  distance = np.linalg.norm(p)
  if distance <= d:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n, d = list(map(int, input().split()))
points = []
for i in range(n):
  points.append(list(map(int, input().split())))
  
cnt = 0
for p in points:
  distance = sqrt(p[0] **2 + p[1] **2)
  if distance <= d:
    cnt += 1
print(cnt)
Problem p02629 (python)

Fixed submission:
n=int(input())

s = ''
for i in range(11):
  if n != 0:
    n -= 1
    s += chr(ord('a') + n % 26)
    n //= 26
print(s[::-1])

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

s = ''
for i in range(11):
  if N != 0:
    n -= 1
    s += chr(ord('a') + N % 26)
    n //= 26
print(s[::-1])
Problem p02659 (python)

Fixed submission:
import decimal
a,b = input().split()
print(int(decimal.Decimal(a) * decimal.Decimal(b)))

Buggy submission (verdict: Runtime Error):
import decimal
n = int(input())
a = list(map(int, input().split()))
ans = 1
if 0 in a:
  print(-1)
else:
  flag = True
  for i in a:
    ans *= i
    if ans > (10 ** 18):
      print(-1)
      flag = False
      break
  if flag:
    print(ans)

Buggy submission (verdict: Runtime Error):
import decimal
a,b = input().split()
print(int(decimai.Decimal(a) * decimal.Decimal(b)))

Buggy submission (verdict: Runtime Error):
import decimal
a,b = list(map(float, input().split()))
print(int(decimai.Decimal(a) * decimal.Decimal(b)))

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

print(int(a * b))
Problem p02688 (python)

Fixed submission:
n,k = list(map(int, input().split()))
hoge = [1] * n

for i in range(k * 2):
  a = list(map(int, input().split()))
  if i % 2 != 0:
    for j in a:
      hoge[j - 1] = 0
      
print(sum(hoge))

Buggy submission (verdict: Runtime Error):
n,k = list(map(int, input().split()))
hoge = [1] * n

for i in range(k * 2):
  if i % 2 != 0:
    a = list(map(int, input().split()))
  	for j in a:
      hoge[j - 1] = 0
      
print(sum(hoge))

Buggy submission (verdict: Runtime Error):
n,k = list(map(int, input().split()))
hoge = [1] * n

for i in range(k * 2):
  if i % 2 == 0:
    a = list(map(int, input().split()))
  	for j in a:
      hoge[j - 1] = 0
      
print(sum(hoge))
Problem p02707 (python)

Fixed submission:
num = int(input())
hoge = list(map(int, input().split()))

fuga = [0] * num

for i in hoge:
  fuga[i - 1] += 1
for i in fuga:
  print(i)

Buggy submission (verdict: Runtime Error):
num = input()
hoge = list(map(int, input().split()))
count = 0
fuga = 0
 
for i in range(1, len(hoge)):
	if hoge[i] != hoge[i - 1]:
		print(i - count)
		fuga += 1
		count = i
		if i == len(hoge) - 1:
			print(i + 1- count)
			fuga += 1
	else:
		if i == len(hoge) - 1:
			print(i + 1- count)
			fuga += 1
for i in range(fuga, num):
	print(0)

Buggy submission (verdict: Runtime Error):
num = input()
hoge = list(map(int, input().split()))
count = 0
fuga = 0

for i in range(1, len(hoge)):
  if hoge[i] != hoge[i - 1]:
    print(i - count)
    fuga += 1
    count = i
    if i == len(hoge) - 1:
      print(i + 1- count)
      fuga += 1
    else:
      if i == len(hoge) - 1:
        print(i + 1- count)
        fuga += 1
for i in range(fuga, num):
  print(0)

Buggy submission (verdict: Runtime Error):
num = int(input())
hoge = list(map(int, input().split()))
fuga = 0
for i in range(num):
  count = 0
  for j in range(fuga, num):
    if hoge[j] == i + 1:
      count += 1
  fuga += count
  print(count)
Problem p02753 (python)

Fixed submission:
s = list(input())

if len(list(set(s))) != 1:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
a_min = math.ceil(a / 0.08)
a_max = math.floor((a + 1) / 0.08)
b_min = math.ceil(b / 0.1)
b_max = math.floor((b + 1) / 0.1)

if a_max < b_min or b_max < a_min:
  print(-1)
else:
  result = b_min if a_min < b_min else a_min
  print(result)

Buggy submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
a_min = math.ceil(a / 0.08)
a_max = math.floor((a + 1) / 0.08)
b_min = math.ceil(b / 0.1)
b_max = math.floor((b + 1) / 0.1)

if a_max < b_min or b_max < a_min:
  print(-1)
else:
  result = b_min if a_min <= b_min else a_min
  print(result)

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

if len(list(set(s)):
       print('Yes')
else:
       print('No')
Problem p02754 (python)

Fixed submission:
N,blue,red = map(int,input().split())
count = N // (blue + red)
amari = N % (blue + red)
if N%(blue+red) >= blue:
    print(blue*(count + 1))
else:
    print(blue * count + amari)

Buggy submission (verdict: Runtime Error):
N,blue,red = input().split()
count = 0
while(1):
  if N > 0:
    N -= blue
    count += 1
  if N > 0:
    N -= red
  else:
    break
print(blue*count + N)
Problem p02759 (python)

Fixed submission:
n=int(input())
print(-(-n//2))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
s,c=[],[]

for _ in range(m):
    a,b=map(int,input().split())
    a-=1
    s.append(a)
    c.append(b)
        
for ans in range(10**(n-1),10**n):
    st=str(ans)
    f=True    
    for i in range(m):
       if st[s[i]] != str(c[j]):
            f=False
          
    if f==True:
        print(ans)
        exit()

print(-1)
Problem p02829 (python)

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

myset = ([1,2,3]) 

myset.remove(a)
myset.remove(b)

l = list(myset)
print(l[0])

Buggy submission (verdict: Runtime Error):
import fractions
a,b = map(int,input().split())
print(a * b // fractions.gcd(a,b))

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

myset = ([1,2,3]) 

myset.remove(a)
myset.remove(b)

l = list(myset)
print(l[0])
Problem p02831 (python)

Fixed submission:
import fractions

a,b = map(int,input().split())
print(a * b // fractions.gcd(a,b))

Buggy submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())
print(a * b // math.gcd(a,b))
Problem p03011 (python)

Fixed submission:
p,q,r = map(int, input().split())

ans = p+q+r-max(p,q,r)
print(ans)

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

half = sum(w) / 2

wk = 0
for i in range(n):
    
    if( wk + w[i] >= half):
        wk += w[i]      
        break
    wk += w[i]  

zenhan = 0
for j in range(0,i + 1):

    zenhan += w[j]  

kouhan = 0
for j in range(i + 1, n):
    kouhan += w[j]  

print(abs(zenhan - kouhan))
Problem p03272 (python)

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

print(n - i + 1)

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

a = []
for _ in range(h):
    wk = input()

    if '#' in wk:
        a.append(wk)

t = []
for j in zip(*a):
    if '#' in j:
        t.append(j)

for list in zip(*t):
    print("".join(list))
Problem p02570 (python)

Fixed submission:
d, t, s = map(int, input().split())
if d/s > t:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
d, t, s = map(int, input().split())
if d/s > t:
  pirnt("No")
else:
  print("Yes")
Problem p02779 (python)

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

if len(set(a)) == n:
  print("YES")
else:
  print("NO")

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

if set(a) == len(a):
  print("NO")
else:
  print("YES")
Problem p02879 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = int(input())
if a < 10 and b < 10:
  print(a＊b)
else:
  print(-1)
Problem p03042 (python)

Fixed submission:
s = input()

if 0 < int(s[:2]) <= 12 and 0 < int(s[2:]) <= 12:
  print("AMBIGUOUS")
elif 0 < int(s[:2]) <= 12:
  print("MMYY")
elif 0 < int(s[2:]) <= 12:
  print("YYMM")
else:
  print("NA")

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

if s[:1] <= 12 and s[2:] <= 12:
  print("AMBIGUOUS")
elif s[:1] <= 12:
  print("MMYY")
elif s[2:] <= 12:
  print("YYMM")
else:
  print("NA")
Problem p02595 (python)

Fixed submission:
N, D = map(int, input().split())
XY = [list(map(int, input().split())) for _ in range(N)]

print(sum(x**2 + y**2 <= D**2 for x, y in XY))

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

print(sum(x**2 + y**2 <= D**2 for x, y in XY))
Problem p02622 (python)

Fixed submission:
S = input()
T = input()

print(sum(s != t for s, t in zip(S, T)))

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

print(sum(s != t for s, t zip(S, T)))
Problem p02659 (python)

Fixed submission:
A, B = input().split()
A = int(A)
B = int(B.replace(".", ""))

print(A*B//100)

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

print(A*B//100)
Problem p02693 (python)

Fixed submission:
K = int(input())
A, B = map(int, input().split())

for i in range(A, B+1):
    if i%K == 0:
        print("OK")
        exit()
print("NG")

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

for i in range(!, B+1):
    if i%K == 0:
        print("OK")
        exit()
print("NG")
Problem p02759 (python)

Fixed submission:
N = int(input())

print(-(-N//2))

Buggy submission (verdict: Runtime Error):
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
B = [int(input()) for _ in range(N)]

l = [[(a_i in B) for a_i in a] for a in A]

# print(l)

flag = 0
for y in range(3):
    flag |= all(l[y])

for x in range(3):
    flag |= all([l[x][y] for y in range(3)])

flag |= all([l[y][x] for x, y in [(0, 0), (1, 1), (2, 2)]])

flag |= all([l[y][x] for x, y in [(0, 2), (1, 1), (2, 0)]])

print("Yes" if flag else "No")