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

Fixed submission:
row_num, col_num = (int(i) for i in input().split())
matrix = [ list(input()) for i in range(row_num)]
transpose_matrix = []
for i in range(col_num):
    transpose_matrix.append([])
    for j in range(row_num):
        transpose_matrix[i].append(matrix[j][i])

empty_rows = []
# row check
for i,line in enumerate(matrix):
    if '#' in line:
        continue
    empty_rows.append(i)
empty_cols = []
# col check
for i,line in enumerate(transpose_matrix):
    if '#' in line:
        continue
    empty_cols.append(i)

for i in range(row_num):
    if i in empty_rows:
        continue
    for j in range(col_num):
        if j in empty_cols:
            continue
        print(matrix[i][j],end="")
    print()

Buggy submission (verdict: Runtime Error):
row_num, col_num = (int(i) for i in input().split())
matrix = [ list(input()) for i in range(row_num)]
transpose_matrix = []
for i in range(row_num):
    transpose_matrix.append([])
    for j in range(col_num):
        transpose_matrix[i].append(matrix[j][i])

empty_rows = []
# row check
for i,line in enumerate(matrix):
    if '#' in line:
        continue
    empty_rows.append(i)
empty_cols = []
# col check
for i,line in enumerate(transpose_matrix):
    if '#' in line:
        continue
    empty_cols.append(i)

for i in range(row_num):
    if i in empty_rows:
        continue
    for j in range(col_num):
        if j in empty_cols:
            continue
        print(matrix[i][j],end="")
    print()

Buggy submission (verdict: Runtime Error):
row_num, col_num = (int(i) for i in input().split())
matrix = [ list(input()) for i in range(row_num)]
transpose_matrix = []
for i in range(row_num):
    transpose_matrix.append([])
    for j in range(col_num):
        transpose_matrix[i].append(matrix[j][i])

empty_rows = []
# row check
for i,line in enumerate(matrix):
    if '#' in line:
        continue
    empty_rows.append(i)
empty_cols = []
# col check
for i,line in enumerate(transpose_matrix):
    if '#' in line:
        continue
    empty_cols.append(i)

for i in range(row_num):
    if i in empty_rows:
        continue
    for j in range(col_num):
        if j in empty_cols:
            continue
        print(matrix[i][j],end="")
    print()
Problem p03280 (python)

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

area = (a - 1) * (b - 1)
print(area)

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

area = (a - 1) * (b - 1)
prin(area)
Problem p03282 (python)

Fixed submission:
s = input()
k = int(input())

if int(s[0]) == 1:
  one_count = 0
  i = 0
  while i < len(s) and int(s[i]) == 1:
    one_count += 1
    i += 1
  if k <= one_count:
    print(1)
  else:
    print(s[one_count])
else:
  print(s[0])

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

if int(s[0]) == 1:
  one_count = 0
  i = 0
  while int(s[i]) == 1:
    one_count += 1
    i += 1
  if k <= one_count:
    print(1)
  else:
    print(s[one_count])
else:
  print(s[0])
Problem p03761 (python)

Fixed submission:
import string
from collections import defaultdict

n = int(input())
s_list = [input() for i in range(n)]

alphabet = string.ascii_lowercase
count_dict = defaultdict(int)

for c in alphabet:
  min_count = float("inf")
  for s in s_list:
    count = s.count(c)
    min_count = min(min_count, count)
    count_dict[c] = min_count

final_string = ''

for k, v in count_dict.items():
  if v == 0:
    continue
  else:
    final_string += k * v

final_string_list = list(final_string)
final_string_list.sort()
    
final_string = ''.join(final_string_list)

print(final_string)

Buggy submission (verdict: Runtime Error):
import string
from collections import defaultdict

n = int(input())
s_list = [input() for i in range(n)]

alphabet = string.ascii_lowercase
count_dict = defaultdict(int)

for c in alphabet:
  min_count = float("inf")
  for s in s_list:
    count = s.count(c)
    min_count = min(min_count, count)
    count_dict[c] = min_count

final_string = ''

for k, v in count_dict.items():
  if v == 0:
    continue
  else:
    final_string += k * v

final_string = ''.join(list(final_string).sort())

print(final_string)
Problem p04045 (python)

Fixed submission:
N,K=map(int,input().split())
D=list(map(int,input().split()))
def solve():
  for i in range(10*N+2):
    if i>=N:
      s=str(i)
      for j in range(len(s)):
        if int(s[j]) in D: break
      else:
        print(i)
        return 0
 
solve()

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

for i in range(10*n+2):
  if i >= n:
    s = str(i)
    for j in range(len(s)):
      if int(s[j]) in d:
        break
    else:
      print(i)
      return 0
Problem p03282 (python)

Fixed submission:
def main():
    S = input()
    K = int(input())
    output = solve(S, K)
    print(output)
    return

def solve(S, K):
    if K <= len(S) and S[:K] == "1"*K:
        # 文字列の1番目からK番目までがすべて1だった場合、
        # それ以降の文字列に1以外の数字があっても1が答え
        return "1"
    for s in S:
        if not s == "1":
            return s  # Sの"1"ではない、最初の数字が答え
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
main():
    S = input()
    K = int(input())
    output = solve(S, K)
    return output

def solve(S, K):
    for s in S:
        if s != "1":
            return s
    return "1"

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
main():
    S = input()
    K = int(input())
    output = solve(S, K)
    return output

def solve(S, K):
    for s in S:
        if s != "1":
            return s
    return "1"
Problem p03284 (python)

Fixed submission:
import sys
N , K = map(int,input().split())

res = 1
if N % K == 0:
    res = 0
print(res)

Buggy submission (verdict: Runtime Error):
res = 1
if N % K == 0:
    res = 0
print(res)
Problem p03325 (python)

Fixed submission:
import sys
N = int(input())
A = list( map(int,input().split()))

res = 0
for a in A:
    count = 0
    while True:
        if a % 2 == 0:
            count += 1
            a = a / 2
        else:
            break
    res += count
print(res)

Buggy submission (verdict: Runtime Error):
res = 0
for a in A:
    count = 0
    while True:
        if a % 2 == 0:
            count += 1
            a = a / 2
        else:
            break
    res += count
Problem p03280 (python)

Fixed submission:
# -*- coding: utf-8 -*-
 
a,b = map(int, input().split())

print((a-1)*(b-1))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a = int(input())
b = int(input())

print((a-1)*(b-1))
Problem p03323 (python)

Fixed submission:
# -*- coding: utf-8 -*-

a,b = map(int, input().split())

if a<9 and b<9:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a=int(input())
b=int(input())

if a<9 and b<9:
    print("Yay!")
else:
    print(":(")
Problem p03423 (python)

Fixed submission:
# -*- coding: utf-8 -*-

a = int(input())

if a < 2:
    print(0)
elif a%3 == 0:
    print(int(a/3))
elif a%3 == 1:
    print(int(a/3))
else:
    print(int(a/3))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a = int(input())

if a < 2:
    print(0)
elif a%3 == 0:
    print(int(a/3))
elif a%3 == 1:
    print(int(a/3) - 1)
else:
    print(int(a/3)
Problem p03433 (python)

Fixed submission:
# -*- coding: utf-8 -*-

n = int(input())
a = int(input())

if n%500==0:
    print("Yes")
elif n%500 < a:
    print("Yes")
elif n%500 == a:
    print("Yes")
elif n%500 > a:
    print("No")
else:
    pass

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

A = 0
B = 0
if n%2 == 0:
    r = int(n/2)
    for i in range(0,r):
        A += max(a)
        a.remove(max(a))
        B += max(a)
        a.remove(max(a))
else:
    r = int(n/2)
    for i in range(0,r):
        A += max(a)
        a.remove(max(a))
        B += max(a)
        a.remove(max(a))
    A += max(a)

print(A-B)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n = int(input())
a = int(input())

if a == 0 and n%500 != 0:
    print("No")
elif n%500==0:
    print("Yes")
elif n%500 =< a:
    print("Yes")
else:
    pass
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a , b= map(int, input())
if a*b%2 :
  print('Odd')
else:
  print('Even')
Problem p03563 (python)

Fixed submission:
r=int(input())
g=int(input())
print(2*g-r)

Buggy submission (verdict: Runtime Error):
lst=list(map(int, input().split()))
r=lst[0]
g=lst[1]
print(2*g-r)

Buggy submission (verdict: Runtime Error):
lst = map(int, input().split())
r = lst[0]
g = lst[1]
print(2*g-r)
Problem p03282 (python)

Fixed submission:
inp1 = input()
inp1 = list(inp1)
inp2 = input()
inp2 = int(inp2)

ans = 1
count = 0
for i in inp1:
    if i != '1':
        ans = int(i)
        break
    else:
        count += 1

if count >= inp2:
    ans = 1

print(ans)

Buggy submission (verdict: Runtime Error):
inp1 = input()
inp1 = list(inp1)
inp2 = input()

ans = 1
for i in inp1:
    if i != '1'
        ans = int(i)
        break

print(ans)

Buggy submission (verdict: Runtime Error):
inp1 = input()
inp1 = int(inp1)
inp2 = input()
inp2 = list(inp2)

ans = 1
for i in inp2:
    if i != '1'
        ans = int(i)
        break

print(ans)
Problem p03861 (python)

Fixed submission:
a, b, x = map(int, input().split())
def count(a, b, x):
  m = b // x + 1
  n = 0
  if a > 0:
    n = (a - 1) // x + 1
    
  return m - n
  
print(count(a, b, x))

Buggy submission (verdict: Runtime Error):
a, b, x = map(int, input().split())
count = 0
for i in range(a, b+1):
  if i % x == 0:
    count++
    
print(count)
Problem p03371 (python)

Fixed submission:
#!/usr/bin/env python
# coding: utf-8
"""
purpose
"""


def main() -> None:
    """
    main function
    """
    (A, B, C, X, Y) = map(int, input().split())

    if 2 * C <= A + B:
        ans = C * min(X, Y) * 2 + min(max((X-Y)*A, (Y-X)*B), max(X-Y, Y-X)*C*2)
    else:
        ans = A * X + B * Y

    print(ans)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8
"""
purpose
"""


def main() -> None:
    """
    main function
    """
    (A, B, C, X, Y) = map(int, input().strip().split())

    if 2 * C <= B and 2 * C <= A:
        ans = (max(X, Y) * 2) * C
    elif 2 * C > A:
        ans = Y * 2 * C + max(X - Y, 0) * B
    elif 2 * C > B:
        ans = X * 2 * C + max(Y - X, 0) * A
    else:
        raise ValueError(f"{A}, {B}, {C}")

    print(ans)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8
"""
purpose
"""


def main() -> None:
    """
    main function
    """
    (A, B, C, X, Y) = map(int, input().trim().split())

    if 2 * C <= B and 2 * C <= A:
        ans = (max(X, Y) * 2) * C
    elif 2 * C > A:
        ans = Y * 2 * C + max(X - Y, 0) * B
    elif 2 * C > B:
        ans = X * 2 * C + max(Y - X, 0) * A
    else:
        raise ValueError(f"{A}, {B}, {C}")

    print(ans)


if __name__ == "__main__":
    main()
Problem p03351 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
print('No' if max(abs(a - b),abs(b - c)) > d　 else 'Yes')

Buggy submission (verdict: Runtime Error):
array= list(map(int,input().split()))
if a[1] - a[0] >d or a[2] - a[1] :
    print("Yes")
else:
    print("No")
Problem p03359 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
print(a if b>=a else a-1)
a, b = map(int, input().split())
print(a if b>=a else a-1)
Problem p03377 (python)

Fixed submission:
a,b,x = map(int, input().split())
if a <= x and x <= a +b:
    print ('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
aa,b,x = map(int, input().split())
if a <= x and x <= a +b:
    print ('YES')
else:
    print('NO')
Problem p03455 (python)

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


a=int(str[0])
b=int(str[1])

if a*b%2==0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a*b%2==0:
    print('Even')
else:
    print('Odd')
Problem p03494 (python)

Fixed submission:
N =int(input())
array=list(map(int, input().split()))

x=[]

for i in array:
    count = 0
    while i%2==0:
        i=i/2
        count = count +1
    x.append(count)
print(min(x))

Buggy submission (verdict: Runtime Error):
import sympy as sp
x=[]
N =int(input())
array=list(map(int, input().split()))
for i in array:
    if i%2==0:
        x.append(sp.factorint(i)[2])
    else:
        x.append(0)
print(min(x))
Problem p03385 (python)

Fixed submission:
text = raw_input()

if 'a' in text and 'b' in text and 'c' in text:
    print 'Yes'
else:
    print 'No'

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

a = int(text.split(' ')[0])
b = int(text.split(' ')[1])
c = int(text.split(' ')[2])

x, y, z = sorted([a, b, c])

cnt = z - y
y = z
x += cnt

cnt += int((y - x) / 2)
x += int((y - x) / 2) * 2

if y - x == 1:
    print(cnt+2)
else:
    print(cnt)
Problem p03280 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split(" "))
print((a-1)*(b-i))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input())
print((a-1)*(b-i))
Problem p03280 (python)

Fixed submission:
A, B = list(map(int, input().split()))
print(A*B-(A+B-1))

Buggy submission (verdict: Runtime Error):
A, B = int(input().split())
print(A*B-(A+B-1))
Problem p03281 (python)

Fixed submission:
N = int(input())

cnt = 0
cnt2 = 0
for i in range(1, N+1, 2):
    cnt = 0
    for j in range(1, N+1):
        if j > i:
            break
        if i % j == 0:
            cnt += 1

    if cnt == 8:
        cnt2 += 1


print(cnt2)

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

cnt = 0
cnt2 = 0
for i in (1, range(N+1), 2):
    cnt = 0
    for j in (1, range(N+1)):
        if j > i:
            cnt = 0
            break
        if i % j == 0:
            cnt += 1

    if cnt == 8:
        cnt2 += 1

print(cnt2)
Problem p03324 (python)

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

if n < 100:
    print(pow(100, d)*n)
else:
    print(pow(100, d)*(n+1))

Buggy submission (verdict: Runtime Error):
d, n = list(int, input().split())
print(d*100*n)
Problem p03563 (python)

Fixed submission:
r = int(input())
g = int(input())

print(2* g - r)

Buggy submission (verdict: Runtime Error):
r = input()
g = input()
print(2* g - r)
Problem p03795 (python)

Fixed submission:
import math
def main(n):
    x = 800 * n
    y = 0
    if n >= 15:
        y = 200 * math.floor(n / 15)
    print(x - y)

main(int(input()))

Buggy submission (verdict: Runtime Error):
import math
def main(n):
    x = 800 * n
    if n >= 15:
        y = 200 * math.floor(n / 15)
    print(x - y)

main(int(input()))

Buggy submission (verdict: Runtime Error):
def Main(n):
    x = 800 * n
    if n >= 15:
        y = 200 * math.floor(n / 15)
    print(x - y)
 
Main(int(input()))

Buggy submission (verdict: Runtime Error):
n = int(input())
def main(n):
    x = 800 * n
    if n >= 15:
        y = 200 * math.floor(n / 15)
    print(x - y)

main(n)
Problem p04011 (python)

Fixed submission:
want = int(input())
due = int(input())
start = int(input())
over = int(input())
e = want - due
yen = 0
if e <= 0:
    for i in range(want):
        yen += start

if e > 0:
    for i in range(due):
        yen += start
    for j in range(e):
        yen += over
print(yen)

Buggy submission (verdict: Runtime Error):
want = int().input()
due = int().input()
start = int().input()
over = int().input()
e = want - due
yen = 0
if e <= 0:
    for i in range(want):
        yen += start
 
if e > 0:
    for i in range(due):
        yen += start
    for j in range(e):
        yen += over
print(yen)

Buggy submission (verdict: Runtime Error):
want = input().int()
due = input().int()
start = input().int()
over = input().int()
e = want - due
yen = 0
if e <= 0:
    for i in range(want):
        yen += start

if e > 0:
    for i in range(due):
        yen += start
    for j in range(e):
        yen += over
print(yen)
Problem p03369 (python)

Fixed submission:
S=input()
a=S.count('o')
y=700+100*a
print(y)

Buggy submission (verdict: Runtime Error):
S=input()
a=S.count(o)
y=700+100*a
print(y)

Buggy submission (verdict: Runtime Error):
input(S)
a=S.count(o)
y=700+100*a
print(y)
Problem p03284 (python)

Fixed submission:
n, k = map(int, input().split())
if n % k != 0:
  print(1)
else:
  print(0)

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

if n < 4: # 最小以下
  print("No")

if n % 4 == 0 or n % 7 == 0:  # 片方でわる
  print("Yes")

four_max = n // 4

m = 1
ans = False
while m < four_max + 1:
  if (n - (4*m)) % 7 == 0:
    ans = True
    break
  m = m+1

if ans:
  print("Yes")
else:
  print("No")
Problem p03292 (python)

Fixed submission:
A1, A2, A3 = map(int, input().split())
print(max(A1,A2,A3)-min(A1,A2,A3))

Buggy submission (verdict: Runtime Error):
1, A2, A3 = map(int, input().split())
print(max(A1,A2,A3)-min(A1,A2,A3))
Problem p03423 (python)

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

Buggy submission (verdict: Runtime Error):
def main():
def main():
    N = int(input())
    print(N // 3)

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

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

Buggy submission (verdict: Runtime Error):
P = [105, 135, 165, 189, 195, 201]

N = int(input())

for i,p in enumerate(P):
  if N < p:
    print(i)
    break
Problem p03280 (python)

Fixed submission:
A,B = input().split(' ')
A=int(A)-1
B=int(B)-1
print(A * B)

Buggy submission (verdict: Runtime Error):
i=105
N=input()
N=int(N)
m=5
n=0
x=0
y=0
while i <= N:
  if i % 2 != 0:
    if i % 3 == 0:
      n = int(i / 3)
      while m < n:
        if i % m == 0:
          x = x + 1
        m=m+2
      if x == 4:
        y = y + 1
  x=0
  n=0
  m=5
  i = i + 1
print(y)
Problem p03282 (python)

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy submission (verdict: Runtime Error):
S = input()
K = input()
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break
if int(K) > i:
  print(S[k])
else:
  print(1)

Buggy submission (verdict: Runtime Error):
S = input()
K = input()
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break
if K > i:
  print(S[k])
else:
  print(1)

Buggy submission (verdict: Runtime Error):
S = input()
K = input()
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break
if K > i:
  print(S[k])
else:
  print(1)

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break
if i >= K:
  print(l[K])
else:
  print(l[i])

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == 100:
  print(1)
if K < 99:
  print(l[K-1])
else:
  print(l[i-1])

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == 100:
  print(1)
if K < 99:
  print(l[K-1])
else:
  print(l[i-1])

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == 100:
  print(1)
if K < 99:
  print(l[K-1])
else:
  print(l[i-1])

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == s:
  print(1)
else:
  print(l[K-1])

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))

l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break
if i == s:
  print(1)
if i >= K:
  print(l[K])
else:
  print(l[i])

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))

l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break
if i == s:
  print(1)
else:
  print(l[K])
Problem p03280 (python)

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

Buggy submission (verdict: Runtime Error):
import numpy

l = raw_input().split()

c =((l[0] - 1) * (l[1] - 1))

print(c)
Problem p03455 (python)

Fixed submission:
a ,b=[int(i) for i in input().split()]
check = (a*b)%2
if check == 0:
	print("Even")
else:
	print("Odd")

Buggy submission (verdict: Runtime Error):
a = int(input()) # 整数
b = int(input()) # 整数

if((a*b)%2 == 0):
    print("Even")
else:
    print("Odd")
Problem p03555 (python)

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

if(s1[0] == s2[2]):
    if(s1[1] == s2[1]):
        if(s1[2] == s2[0]):
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:
    print("NO")

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

if(s1[0] == s2[2]):
    if(s1[1] == s2[1]):
        if(s1[2] == s2[0]):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")
Problem p03280 (python)

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

c = (a - 1) * (b - 1)

print(c)

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

#条件満たす数カウント
cn = 0
#約数カウント
cy = 0

if n < 105:
    print(0)
    sys.exit()

for i in range(105, n+1):
    if i % 2 == 0:
        continue

    for j in range(1, i+1):
        if i % j == 0:
            cy += 1
    if cy == 8:
        cn += 1
    cy = 0
print(cn)
Problem p03493 (python)

Fixed submission:
s1, s2, s3 = map(int, input())
print(s1+s2+s3)

Buggy submission (verdict: Runtime Error):
s1,s2,s3 = map(int, input().split())
print(s1+s2+s3)
Problem p03777 (python)

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

if A == B:
    print("H")
elif A != B:
    print("D")

Buggy submission (verdict: Runtime Error):
if A == B:
    print("H")
elif A != B:
    print("D")
Problem p03501 (python)

Fixed submission:
import sys
n, a, b = [int(x) for x in input().split()]
print(min(a*n, b))

Buggy submission (verdict: Runtime Error):
import sys
n = int(sys.argv[1])
a = int(sys.argv[2])
b = int(sys.argv[3])
print(min(a*n, b))

Buggy submission (verdict: Runtime Error):
import sys
n = int(sys.argv[1])
a = int(sys.argv[2])
b = int(sys.argv[3])
print(min(a*n, b))
Problem p03502 (python)

Fixed submission:
x_str = input()
x = int(x_str)
digits = [int(a) for a in x_str]
fx = sum(digits)
if x % fx == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x = input()
digits = [int(a) for a in x]
fx = sum(digits)
if x % fx == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x = input()
digits = [int(a) for a in x]
fx = sum(digits)
print("Yes" if x % fx == 0 else "No")
Problem p03280 (python)

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

print(a*b - a - b + 1)

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

print(a*b - (a+b) + 1)