Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys 
import math
try:
	sys.stdin = open('input.txt', 'r') 
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for tt in range(1):
	a,b,c,d = map(int,input().split())
	elif math.ceil(c/b) - math.ceil(a/d)<= 0:
		print ("Yes")
	else:
		print("No")
	

Fixed submission:
import sys 
import math
try:
	sys.stdin = open('input.txt', 'r') 
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for tt in range(1):
	a,b,c,d = map(int,input().split())
	if math.ceil(c/b) - math.ceil(a/d)<= 0:
		print ("Yes")
	else:
		print("No")
Buggy python submission (verdict: Runtime Error):
for _ in range(1):
	a,b,c = map(int,input().split())
    print(c,a,b)


Fixed submission:
for _ in range(1):
	a,b,c = map(int,input().split())
	print(c,a,b)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
k = int(input())

count = 0

if k <= a+b:
    count += a
else:
    count += a-(k-(a+b))
print(count)

Fixed submission:
#B
i = input()
a = int(i.split()[0])
b = int(i.split()[1])
c = int(i.split()[2])
k = int(i.split()[3])

count = 0

if k < a:
    count += a-(a-k)
elif k <= a+b:
    count += a
elif a+b < k:
    count += (a)-(k-(a+b))
print(count)
Buggy python submission (verdict: Runtime Error):
A = input().split
a,b = map(int,A)
 
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Fixed submission:
a,b = map(int,input().split())
 
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

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

product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Fixed submission:
a,b = map(int,input().split())
 
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Fixed submission:
a,b = map(int,input().split())
 
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Fixed submission:
a,b = map(int,input().split())
 
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
product = a*b

if product%2==0:
    print("Even")
else:
    print('Odd')

Fixed submission:
a,b = map(int,input().split())
 
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
product = a*b

if product%2==0:
    print("Even")
else:
    print('Odd')

Fixed submission:
a,b = map(int,input().split())
 
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
product = a*b
divide_type = type(product/2)

if divide_type == int:
    print("Even")
if divide_type==float:
    print('Odd')

Fixed submission:
a,b = map(int,input().split())
 
product = a*b
if product%2==0:
    print("Even")
elif product%2==1:
    print('Odd')
Buggy python submission (verdict: Runtime Error):
#ANS-3
input_N,A,B = input_all.split()[0],int(input_all.split()[1]),int(input_all.split()[2])

count = 0
for i in range(int(input_N)+1):
    sum_all = 0
    i_str = str(i)
    for j in range(len(i_str)):
        sum_all += int(i_str[j])
    if A<=sum_all:
        if sum_all<=B:
            count += i
            
print(count)

Fixed submission:
#ANS
input_all = input()
input_N = input_all.split()[0] #str型で読み込む
A,B = int(input_all.split()[1]),int(input_all.split()[2]) #int型で読み込む
input_list = [int(input_N[i]) for i in range(len(input_N))]

e = input_list[-1]
if len(input_list)>1:
    d = input_list[-2]
    if len(input_list)>2:
        c = input_list[-3]
        if len(input_list)>3:
            b = input_list[-4]
            if len(input_list)>4:
                a = input_list[-5]

count = 0
for i in range(int(input_N)+1):
    sum_all = 0
    i_str = str(i)
    for j in range(len(i_str)):
        sum_all += int(i_str[j])
    if A<=sum_all:
        if sum_all<=B:
            count += i
print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A_list = list(map(int,input().split()))

iter_num_list = []
for a in A_list:
    count = 0
    while a%2 == 0:
        a = a/2
        count += 1
    iter_num_list.append(count)
ans = sorted(iter_num_list)[0]
print(ans)

Fixed submission:
s = str(input())
s_list = [int(s[0]),int(s[1]),int(s[2])]
count = 0
for i in s_list:
    if i==1:
        count +=1
print(count)

Buggy python submission (verdict: Runtime Error):
#(問3)ANS-1
iter = map(int,input().split())
all_list = []
for i in iter:
    all_list.append(i)
N = all_list[0]
A_list = all_list[1:]

iter_num_list = []
for a in A_list:
    count = 0
    while a%2 == 0:
        a = a/2
        count += 1
    iter_num_list.append(count)
ans = sorted(iter_num_list)[0]
print(ans)

Fixed submission:
s = str(input())
s_list = [int(s[0]),int(s[1]),int(s[2])]
count = 0
for i in s_list:
    if i==1:
        count +=1
print(count)
Buggy python submission (verdict: Runtime Error):
#(問3)ANS
iter = map(int,input().split())
all_list = []
for i in iter:
    all_list.append(i)
N = all_list[0]
A_list = all_list[1:]

iter_num_list = []
for a in A_list:
    count = 0
    while a%2 == 0:
        a = a/2
        count += 1
    iter_num_list.append(count)
ans = min(iter_num_list)
print(ans)

Fixed submission:
#(問3)ANS-1
import sys
lines = sys.stdin.readlines()
N = lines[0]
N = N.strip()
A = lines[1]
A_iter = map(int,A.split()) #イテレータを生成
A_list = []
for i in A_iter:
    A_list.append(i)

iter_num_list = []
for a in A_list:
    count = 0
    while a%2 == 0:
        a = a/2
        count += 1
    iter_num_list.append(count)
ans = sorted(iter_num_list)[0]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math

a, b, n = (int(x) for x in input().split())

x = 0
max_x = 0

while x <= n:
    val = math.floor(a * x / b) - a * math.floor(x / b)
    if val > max_x:
        max_x = val
    x += 1

print(max_x)

Fixed submission:
import math

a, b, n = (int(x) for x in input().split())

if b > n:
    print(math.floor(a * n / b) - a * math.floor(n / b))
else:
    print(math.floor(a * (b -1) / b) - a * math.floor((b -1) / b))
Buggy python submission (verdict: Runtime Error):
s, t = input().strip().split()
if s == t[:-1]:
  print("Yes")
else:
  print("No")


Fixed submission:
s = input().strip()
t = input().strip()
if s == t[:-1]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
assert n >= 2
a = [int(x) for x in input().split()]
assert len(a) == n
count = 0
for i in range(n-1):
    for j in range(i+1, n):
        if j - i == a[i] + a[j]:
            count += 1
print(count)


Fixed submission:
from collections import Counter
n = int(input())
assert n >= 2
a = [int(x) for x in input().split()]
assert len(a) == n
ap = Counter([i + x for i, x in enumerate(a)])
am = Counter([i - x for i, x in enumerate(a)])
count = sum([v * ap.get(k, 0) for k, v in am.items() if k >= 1])
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
assert n >= 2
a = [int(x) for x in input().split()]
assert len(a) == n
count = 0
for i in range(n-1):
    for j in range(i+1, n):
        if j - i == a[i] + a[j]:
            count += 1
print(count)


Fixed submission:
from collections import Counter
n = int(input())
assert n >= 2
a = [int(x) for x in input().split()]
assert len(a) == n
ap = Counter([i + x for i, x in enumerate(a)])
am = Counter([i - x for i, x in enumerate(a)])
count = sum([v * ap.get(k, 0) for k, v in am.items() if k >= 1])
print(count)
Buggy python submission (verdict: Runtime Error):
import numpy as np


def count_multi(s, d):
  m = a = np.array([int(c) for c in s])  # .astype(np.int)
  keta = 1
  count = np.count_nonzero(m == 0)
  while len(m) > 1:
    m = (m[:-1]*10 + a[keta:]) % d
    keta += 1
    count += np.count_nonzero(m == 0)
  return count
        
print(count_multi(input().strip(), 2019))


Fixed submission:
s, w = [int(x) for x in input().strip().split()]
print("safe" if s > w else "unsafe")

Buggy python submission (verdict: Runtime Error):
import numpy as np


def count_multi(s, d):
  m = a = np.array([c for c in s]).astype(np.int)
  keta = 1
  count = np.count_nonzero(m == 0)
  while len(m) > 1:
    m = (m[:-1]*10 + a[keta:]) % d
    keta += 1
    count += np.count_nonzero(m == 0)
  return count
        
print(count_multi(input().strip(), 2019))


Fixed submission:
s, w = [int(x) for x in input().strip().split()]
print("safe" if s > w else "unsafe")

Buggy python submission (verdict: Runtime Error):
import numpy as np


def count_multi(s, d):
  a = np.array([c for c in s]).astype(np.int)
  m = a  # % d
  keta = 1
  count = np.count_nonzero(m == 0)
  while len(m) > 1:
    m = (10*m[:-1] + a[keta:]) % d
    keta += 1
    count += np.count_nonzero(m == 0)
  return count
        
print(count_multi(input().strip(), 2019))


Fixed submission:
s, w = [int(x) for x in input().strip().split()]
print("safe" if s > w else "unsafe")
Buggy python submission (verdict: Runtime Error):
import sys
n = int(input().strip())
items = set()
for _ in range(n):
  items |= {sys.readline().strip()}
print(len(items))

Fixed submission:
import sys
n = int(input().strip())
items = set()
for _ in range(n):
  items |= {sys.stdin.readline().strip()}
print(len(items))

Buggy python submission (verdict: Runtime Error):
import sys
n = int(input().strip())
items = set()
for _ in range(n):
  items |= {sys.readline().strip()}

Fixed submission:
import sys
n = int(input().strip())
items = set()
for _ in range(n):
  items |= {sys.stdin.readline().strip()}
print(len(items))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = 0

for i in range(N):
   S = S+i+1 if N//(i+1)==N%(i+1) else S

print(S)


Fixed submission:
N,K = map(int, input().split())
print(N-K+1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
print(N-K+1)

Fixed submission:
N,K = map(int, input().split())
print(N-K+1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
print(N-K)

Fixed submission:
N,K = map(int, input().split())
print(N-K+1)
Buggy python submission (verdict: Runtime Error):


def get_str(st, i, len_val):
    ret = '?'*len_val
    for s in st:
        ret[i] = s
        i += 1
    return ret

def main():
    a = input()
    b = input()
    c = input()


    total_len = 6001

    def f(a1, b1, c1):
        nonlocal total_len
        for A,B,C in zip(a1,b1,c1):
            if len(set([char for char in [A,B,C] if char != '?'])) > 1:
                return False
        while a1[-1] != '?':
            a1 = a1[:-1]
        if len(a1) < total_len:
            total_len = len(a1)
        return True

    a_temp = get_str(a,0,len(a)+len(b)+len(c))

    for i in range(len(a)+len(b)+len(c)):
        try:
            b_temp = get_str(b,i,len(a)+len(b)+len(c))
            for j in range(len(a)+len(b)+len(c)):
                try:
                    c_temp = get_str(c,j,len(a)+len(b)+len(c))

                except:
                    pass
        except:
            pass

if __name__ == '__main__':
    main()


Fixed submission:

def main():
    K = int(input())
    List = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    print(List[K-1])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    a,b,c = list(map(int,input().split(' ')))
    #a,b,c = list(map(lambda x:abs(int(x)),input().split(' ')))
    # if (a**0.5 + b**0.5) < (c**0.5):
    #     print('Yes')
    # else:
    #     print('No')

    if c < 0:
        print('No')
        return
    if (4*a*b) < ((c-a-b)**2):
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()


Fixed submission:

def main():
    K = int(input())
    List = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    print(List[K-1])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    a,b,c = list(map(int,input().split(' ')))
    #a,b,c = list(map(lambda x:abs(int(x)),input().split(' ')))
    # if (a**0.5 + b**0.5) < (c**0.5):
    #     print('Yes')
    # else:
    #     print('No')

    if (4*a*b) < ((c-a-b)**2) and c>=0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()


Fixed submission:

def main():
    K = int(input())
    List = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    print(List[K-1])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    a,b,c = list(map(int,input().split(' ')))
    #a,b,c = list(map(lambda x:abs(int(x)),input().split(' ')))
    # if (a**0.5 + b**0.5) < (c**0.5):
    #     print('Yes')
    # else:
    #     print('No')

    if (4*a*b) < ((c-a-b)**2) and c>=0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()


Fixed submission:

def main():
    K = int(input())
    List = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    print(List[K-1])

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python
# coding: UTF-8

def main():
    A,B,M = list(map(int, input().split(' ')))
    a_list = list(map(int, input().split(' ')))
    b_list = list(map(int, input().split(' ')))

    price_list = 2*10**5
    for i in range(M):
        temp = list(map(int, input().split(' ')))
        if price_list > a_list[temp[0]-1] + b_list[temp[1]-1] - temp[2]:
            price_list = a_list[temp[0]-1] + b_list[temp[1]-1] - temp[2]

    lower = min(a_list) + min(b_list)
    if lower < price_list:
        print(lower)
    else:
        print(price_list)

if __name__=='__main__':
    main()


Fixed submission:
#!/usr/bin/python
# coding: UTF-8

def main():
    arg = input()
    if arg in ['hi'*i for i in range(1,6)]:
        print('Yes')
    else:
        print('No')

if __name__=='__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys

def main(arg):

    if arg[0] in ['hi'*i for i in range(1,6)]:
        print('Yes')
    else:
        print('No')

if __name__=='__main__':
    main(sys.argv[1:])


Fixed submission:
#!/usr/bin/python
# coding: UTF-8

def main():
    arg = input()
    if arg in ['hi'*i for i in range(1,6)]:
        print('Yes')
    else:
        print('No')

if __name__=='__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys

def process(data):
	count = 0

	N = int(data[0][0])
	K = int(data[0][1])
	A = list(map(int, data[1])) * K

	for i in range(len(A)-1):
		for j in range(i+1, len(A)):
			if A[i] > A[j]:
				count += 1

	count = count % (10**9+7)
	return count



def main():
	d = []
	for i in range(2):
		data = raw_input()
		data = data.split(" ")
		d.append(data)
	print(process(d))

if __name__ == '__main__':
    main()

Fixed submission:
import sys

def process(data):
	count1 = 0
	count2 = 0

	N = int(data[0][0])
	K = int(data[0][1])
	A = list(map(int, data[1]))

	for i in range(len(A)-1):
		for j in range(i+1, len(A)):
			if A[i] > A[j]:
				count1 += 1
	A.reverse()
	
	for i in range(len(A)-1):
		for j in range(i+1, len(A)):
			if A[i] > A[j]:
				count2 += 1	

	count1 = count1 * K*(K+1)/2
	count2 = count2 * (K-1)*K/2

	count = count1 + count2

	count = count % (10**9+7)
	return count



def main():
	d = []
	for i in range(2):
		data = raw_input()
		data = data.split(" ")
		d.append(data)
	print(process(d))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []

for item in range(n):
    item = input()
    if(item not in s):
        s.append(item)

print(len(s))

Fixed submission:
import collections

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

ans = collections.Counter(s)
print(len(ans))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]
bag =[]

for item in s:
    if(item not in bag):
        bag.append(item)

print(len(bag))

Fixed submission:
import collections

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

ans = collections.Counter(s)
print(len(ans))
Buggy python submission (verdict: Runtime Error):
s = input()
YYMM, MMYY, ova = False, False, False

if(1 <= int(s[:2]) <= 12):
    MMYY = True
if(1 <= int(s[3:]) <= 12):
    YYMM = True

if(MMYY and YYMM):
    ova = True

if(ova):
    print('AMBIGUOUS')
elif(MMYY):
    print("MMYY")
elif(YYMM):
    print('YYMM')
else:
    print('NA')

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

print(S[: K-1] + S[K - 1].lower() + S[K :])
Buggy python submission (verdict: Runtime Error):
n = int(input())

value = list(map(int(input().split()))
cost = list(map(int(input().split()))

ans = 0
for j in range(n):
    if value[j] -cost[j] >0:
            ans +=value[j] - cost[j]

print(ans)



Fixed submission:
n = int(input())

value = list(map(int, input().split()))
cost = list(map(int, input().split()))

ans = 0
for j in range(n):
    if value[j] -cost[j] >0:
            ans +=value[j] - cost[j]

print(ans)

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

value = list(map(int(input().split()))
cost = list(map(int(input().split()))

ans = 0
for j in range(n):
    if value[j] -cost[j] >0:
            ans +=value[j] - cost[j]

print(ans)



Fixed submission:
n = int(input())

value = list(map(int, input().split()))
cost = list(map(int, input().split()))

ans = 0
for j in range(n):
    if value[j] -cost[j] >0:
            ans +=value[j] - cost[j]

print(ans)
Buggy python submission (verdict: Runtime Error):
N, A, B, C = map(int, input().split())
l = list(int(input()) for i in range(N))
inf = 10**9

    def dfs(cur,a,b,c):
        if cur == N:
            return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else inf
        ret0 = dfs(cur+1,a,b,c)
        ret1 = dfs(cur+1,a+l[cur],b,c) + 10
        ret2 = dfs(cur+1,a,b+l[cur],c) + 10
        ret3 = dfs(cur+1,a,b,c+l[cur]) + 10
    
        return min(ret0,ret1,ret2,ret3)
 
print(dfs(0,0,0,0))

Fixed submission:
N,A,B,C = map(int,input().split())
l = [int(input()) for i in range(N)]
inf = 10**9
def dfs(cur,a,b,c):
    if cur == N:
        return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else inf
    ret0 = dfs(cur+1,a,b,c)
    ret1 = dfs(cur+1,a+l[cur],b,c) + 10
    ret2 = dfs(cur+1,a,b+l[cur],c) + 10
    ret3 = dfs(cur+1,a,b,c+l[cur]) + 10
    
    return min(ret0,ret1,ret2,ret3)
 
print(dfs(0,0,0,0))

Buggy python submission (verdict: Runtime Error):
N, A, B, C = map(int, input().split())
l = list(int(input()) for i in range(n))
inf = 10**9

    def dfs(cur,a,b,c):
        if cur == N:
            return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else inf
        ret0 = dfs(cur+1,a,b,c)
        ret1 = dfs(cur+1,a+l[cur],b,c) + 10
        ret2 = dfs(cur+1,a,b+l[cur],c) + 10
        ret3 = dfs(cur+1,a,b,c+l[cur]) + 10
    
        return min(ret0,ret1,ret2,ret3)
 
print(dfs(0,0,0,0))

Fixed submission:
N,A,B,C = map(int,input().split())
l = [int(input()) for i in range(N)]
inf = 10**9
def dfs(cur,a,b,c):
    if cur == N:
        return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else inf
    ret0 = dfs(cur+1,a,b,c)
    ret1 = dfs(cur+1,a+l[cur],b,c) + 10
    ret2 = dfs(cur+1,a,b+l[cur],c) + 10
    ret3 = dfs(cur+1,a,b,c+l[cur]) + 10
    
    return min(ret0,ret1,ret2,ret3)
 
print(dfs(0,0,0,0))
Buggy python submission (verdict: Runtime Error):
ab, bc, ca = map(int, input().split())
5 12 13
S = int((ab * bc) /2)

print(S)

Fixed submission:
ab, bc, ca = map(int, input().split())
S = int((ab * bc) /2)
print(S)
Buggy python submission (verdict: Runtime Error):
n = int(input())

if n == 1:
    print("Hello World")
elif n ==2:
    a, b = map(int, input().split())
    ans = a+b
    print(ans)

Fixed submission:
n = int(input())

if n == 1:
    print("Hello World")
elif n ==2:
    a = int(input())
    b = int(input())
    ans = a+b
    print(ans)

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

if n == 1:
    print("Hello World")
else:
    a, b = map(int, input().split())
    ans = a+b
    print(ans)

Fixed submission:
n = int(input())

if n == 1:
    print("Hello World")
elif n ==2:
    a = int(input())
    b = int(input())
    ans = a+b
    print(ans)

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

if n == 1:
    print("Hello World")
else:
    a, b = map(int, input().split())
    ans = a+b
    print(ans)
    

Fixed submission:
n = int(input())

if n == 1:
    print("Hello World")
elif n ==2:
    a = int(input())
    b = int(input())
    ans = a+b
    print(ans)

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

if n == 1:
    print("HEllo World")
else:
    a, b = map(int, input().split())
    ans = a+b
    print(ans)

Fixed submission:
n = int(input())

if n == 1:
    print("Hello World")
elif n ==2:
    a = int(input())
    b = int(input())
    ans = a+b
    print(ans)
Buggy python submission (verdict: Runtime Error):
a , b = map(int, input().split())

ans1 = a * B
ans2 = a* b * 2
ans3 = a * b* 3

if ans1%2 == 1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
else:
    print("No")

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

ans1 = a * b
ans2 = a* b * 2
ans3 = a * b* 3

if ans1%2 == 1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
else:
    print("No")

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

ans1 = a * B
ans2 = a* b * 2
ans3 = a * b* 3

if ans1%2 == 1:
    print('Yes')
elif ans2%2 ==1:
    print('Yes')
elif ans2%2 ==1:
    print('Yes')
else:
    print("No")

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

ans1 = a * b
ans2 = a* b * 2
ans3 = a * b* 3

if ans1%2 == 1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
elif ans2%2 ==1:
    print('Yes')
    exit
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
プ
 問題
 質問
 提出
 提出一覧
 順位表
 コードテスト
 解説
提出 #5696340

ソースコード 

Copy
Copy
# 入力
H,W=map(int,input().split())
 
l=[]
for i in range(H):
  x=input()
  # 白いマスのみからなる場合は追加しない
  if x!='.'*W:
    l.append(x)
 
rm=[]
for i in range(W):
  # フラグ
  f=True
  for j in range(len(l)):
    if l[j][i]=='#':
      f=False
 
  # 取り除く列の添字を保存しておく
  if f:
    rm.append(i)
 
a=[]
for x in l:
  for i in rm[::-1]:
    x=x[:i]+x[i+1:]
  a.append(''.join(x))
 
# 出力
for i in range(len(a)):
  print(''.join(a[i]))

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

print(N-i +1)
Buggy python submission (verdict: Runtime Error):
S = list(input())
K = int(input())

for i in range(K):
    if S[i] == '1':
        if i == K:
            res = 1
        else:
            continue
    else:
        res = S[i]
        break
print(res)


Fixed submission:
S = list(input())
K = int(input())

res =0
for i in range(K):
    if S[i] == '1':
        if i == K-1:
            res = 1
        else:
            continue
    else:
        res = S[i]
        break
print(res)
Buggy python submission (verdict: Runtime Error):
if d == 0:
        print(n)
    elif d == 1:
        print(n * 100)
    else :
        print(n * 10000)

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

if n != 100:
    if d == 0:
        print(n)
    elif d == 1:
        print(n * 100)
    else :
        print(n * 10000)
else:
    if d == 0:
        print(101)
    elif d == 1:
        print(10100)
    else :
        print(1010000)