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

Fixed submission:
S = input()
ans = True
for i in range(0,len(S)-1,2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break
if not ans or len(S)%2 == 1:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
S = input()
ans = True
for i in range(0,len(S),2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break
if ans:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A,B,M = [int(x) for x in input().split()]
A_list = [int(x) for x in input().split()]
B_list = [int(y) for y in input().split()]
discount = []
min = 10000000
for _ in range(M):
  case = [int(x) for x in input().split()]
  discount.append(case)

min_a = sorted(A_list)[0]
min_b = sorted(B_list)[0]

for i in range(M):
  temp = A_list[discount[i][0]-1] + B_list[discount[i][1]-1] - discount[i][2]
  if temp < min:
    min = temp
    
if min_a + min_b > min:
  print(min)
else:
  print(min_a + min_b)

Buggy submission (verdict: Runtime Error):
S = input()
ans = True
for i in range(0,len(S),2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break

if ans:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S = input()
ans = True
for i in range(0,len(S),2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break

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

Fixed submission:
s = input()
q_number = int(input())
reverse_flag = 1
head = ""
tail = ""
for i in range(q_number):
  temp = input().split()
  if temp[0] == "1": 
    reverse_flag = reverse_flag * -1
  else:
    headstails = int(temp[1])*reverse_flag 
    if headstails == 1 or headstails == -2:
      head = temp[2] + head
    else:
      tail = tail + temp[2]
      
if reverse_flag == 1:
  print(head+s+tail)
else:
  print(tail[::-1]+s[::-1]+head[::-1])

Buggy submission (verdict: Runtime Error):
s = input()
q_number = int(input())
reverse_flag = 1
for i in range(q_number):
  temp = input().split()
  if temp[0] == "1": 
    reverse_flag = reverse_flag * -1
  else:
    if int(temp[1]) == 1 or -2:
      s = temp[2] + s
    elif int(temp[1]) == -1 or 2:
      s = s + temp[2]      

if reverse_flag = -1:
  s = s[::-1]
  
print(s)
Problem p02780 (python)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
 
now = sum(p[:K])
saidai = now
for i in range(K, N):
  now -= p[i-K]
  now += p[i]
  if now > saidai:
    saidai = now
 
print('{:.12f}'.format((saidai + K)/2))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
p = list(map(int, input().split()))
 
now = sum(p[:K])
saidai = now
for i in range(K, N):
  now -= p[i-K]
  now += p[i+K]
  if now > saidai:
    saidai = now

print('{:.12f}'.format((saidai + K)/2))

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

N, K = map(int, input().split())
p = list(map(int, input().split()))

pos = 0
saidai = 0
for i in range(N-K+1):
  temp = sum(p[i:i+K])
  if saidai < temp:
    saidai = temp
    pos = i
    
kitaichi = 0
for i in range(K):
  temp = (p[pos+i]+1)*p[pos+i]/2
  kitaichi = kitaichi + float(temp/p[pos+i])
  
print('{:.12f}'.format(kitaichi))
Problem p02802 (python)

Fixed submission:
n, m = map(int, input().split())
p = []
s = []
for i in range(m):
  p_i, s_i = input().split()
  p.append(int(p_i))
  s.append(s_i)

list_correct = [0] * n
list_pena = [0] * n
for i in range(m):
  if s[i] == "AC":
    if list_correct[p[i]-1] == 0:
      list_correct[p[i]-1] = 1
  else:
    if list_correct[p[i]-1] == 0:
      list_pena[p[i]-1] = list_pena[p[i]-1] + 1
      
sum_correct = sum(list_correct)
combined = [x * y for (x, y) in zip(list_correct, list_pena)]
sum_pena = sum(combined)

print (sum_correct, sum_pena)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
p = []
s = []
for i in range(m):
  p_i, s_i = input().split()
  p.append(int(p_i))
  s.append(s_i)

list_correct = [0] * n
list_pena = [0] * n
for i in range(m):
  if s[i] == "AC":
    if list_correct[p[i]] == 0:
      list_correct[p[i]] = 1
  else:
    if list_correct[p[i]] == 0:
      list_pena[p[i]] = list_pena[p[i]] + 1
      
sum_correct = sum(list_correct)
combined = [x * y for (x, y) in zip(list_correct, list_pena)]
sum_pena = sum(combined)

print (sum_correct, sum_pena)
Problem p02898 (python)

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

goukei = 0
for i in range(len(array)):
	if array[i] >= k:
		goukei += 1

print(goukei)

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

goukei = 0
for i in range(len(array)):
	if array[i] >= k:
		goukei += 1

print(goukei)
Problem p02909 (python)

Fixed submission:
text = input()

result = ''
if text == 'Sunny':
	result = 'Cloudy'
elif text == 'Cloudy':
	result = 'Rainy'
else:
	result = 'Sunny'
    
print(result)

Buggy submission (verdict: Runtime Error):
mnum, gnum = map(int, input().split())
array = list(map(int, input().split()))

for i in range(gnum):
	array.sort()
	array[len(array)-1] = array[len(array)-1]/2

print(sum(array))
Problem p02910 (python)

Fixed submission:
text = input()
 
flg = 0
for i in range(len(text)):
	if i%2 == 0:
		if text[i:i+1] != 'R' and text[i:i+1] != 'U' and text[i:i+1] != 'D':
			flg = 1
	else:
		if  text[i:i+1] != 'L' and text[i:i+1] != 'U' and text[i:i+1] != 'D':
			flg = 1
if flg == 1:
	print('No')
else:
	print('Yes')

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

flg = 0
for i in range(len(text)):
	if i%2 == 0:
		if text[i:i+1] != 'R' and text[i:i+1] and 'U' and text[i:i+1] != 'D':
			flg = 1
	else:
		if  text[i:i+1] != 'U' and text[i:i+1] and 'U' and text[i:i+1] != 'D':
			flg = 1
if flg == 1:
	print('No')
else:
	pring('Yes')
Problem p02911 (python)

Fixed submission:
a, b, c = map(int, input().split())
array = []
for i in range(c):
	array.append(int(input()))

point = [b] * a
 
for i in range(c):
	point[array[i]-1] = point[array[i]-1] + 1
            
for i in range(len(point)):
	if (point[i]-c) > 0 :
		print('Yes')
	else:
		print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
array = []
for i in range(c):
	array.append(int(input()))

point = [b] * a
 
for i in range(c):
	point[int(array[i])] = point[int(array[i])] + 1
            
for i in range(len(point)):
	if point[i]-c > 0 :
		print('Yes')
	else:
		print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
array = []
for i in range(c):
	array.append(input())
 
point = [b] * a
 
for i in range(c):
	for j in range(a):
		if j+1 != int(array[c]):
			point[j] = point[j] -1
            
for i in range(a):
	if point[i] > 0:
		print('Yes')
	else:
		print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, intput().split())
array = []
for i in range(c):
	array.append(input())

point = [b] * a

for i in range(c):
	for j in range(a):
		if j+1 != int(array[c]):
			point[j] = point[j] -1
            
for i in range(a):
	if point[i] > 0:
		print('Yes')
	else:
		print('No')
Problem p02917 (python)

Fixed submission:
num = int(input())
array = list(map(int, input().split()))
sum = 0
 
for i in range(num):
	if i == 0:
		sum += array[i]
	elif i < (num-1):
		if array[i] > array[i-1]:
			sum += array[i-1]
		else:
			sum += array[i]
	else:
		sum += array[i-1]
        
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
array = list(map(int, input().split()))
sum = 0
 
for i in range(num):
	if i == 0:
		sum += array[i]
	else if i < (num-1):
		if array[i] > array[i-1]:
			sum += array[i-1]
		else:
			sum += array[i]
	else:
		sum += array[i-1]
        
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
array = list(map(int, input().split()))
sum = 0
 
for i in range(num):
	if i == 0:
      sum += array[i]
    else if i < (num-1):
      if array[i] > array[i-1]:
        sum += array[i-1]
      else:
        sum += array[i]
    else:
      sum += array[i-1]
        
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
array = map(int, input().split())
sum = 0
 
for (i = 0; i < num; i++):
	if i == 0:
      sum += array[i]
    else if i < (num-1):
      if array[i] > array[i-1]:
        sum += array[i-1]
      else:
        sum += array[i]
    else:
      sum += array[i-1]
        
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
array = map(int, input().split())
sum = 0
 
for i in range(num):
	if i == 0:
      sum += array[i]
    else if i < (num-1):
      if array[i] > array[i-1]:
        sum += array[i]
      else:
        sum += array[i-1]
    else:
      sum += array[i-1]
        
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
array = list(map(int, input().split()))
sum = 0
 
for (i = 0; i < num; i++):
	if i == 0:
      sum += array[i]
    else if i < (num-1):
      if array[i] > array[i-1]:
        sum += array[i]
      else:
        sum += array[i-1]
    else:
      sum += array[i-1]
        
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
array = map(int, input().split())
sum = 0
 
for (i = 0; i < num; i++):
	if i == 0:
      sum += array[i]
    else if i < (num-1):
      if array[i] > array[i-1]:
        sum += array[i]
      else:
        sum += array[i-1]
    else:
      sum += array[i-1]
        
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
array = map(int, input().split())
sum = 0

for (i = 0; i < num; i++):
	if i == 0:
      sum += i
    else if i < (num-1):
      if array[i] > array[i-1]:
        sum += array[i]
      else:
        sum += array[i-1]
    else:
      sum += array[i-1]
        
print(sum)
Problem p03434 (python)

Fixed submission:
def main():
  size = input()
  a = list(map(int, input().split()))
  a = merge_sort(a)
  
  alice_res = 0
  bob_res = 0
  
  for i in range(len(a)):
    if i%2 == 0:
      alice_res += a[i]
    else:
      bob_res += a[i]
 
  print(alice_res-bob_res)
  
 
def merge_sort(array):
  if len(array)<=1:
    return array
  
  spl_size = len(array)//2
  
  left_list = merge_sort(array[:spl_size])
  right_list = merge_sort(array[spl_size:])
  
  return merge_list(left_list, right_list)
 
 
def merge_list(left_list, right_list):
  left_index = 0
  right_index = 0
  sorted_list = []
  
  while left_index<len(left_list) and right_index<len(right_list):
    if left_list[left_index] < right_list[right_index]:
      sorted_list.append(right_list[right_index])
      right_index+=1
    else:
      sorted_list.append(left_list[left_index])
      left_index+=1
      
  if left_index == len(left_list):
    sorted_list.extend(right_list[right_index:])
  if right_index == len(right_list):
    sorted_list.extend(left_list[left_index:])
      
  return sorted_list
    
                          
main()

Buggy submission (verdict: Runtime Error):
def main():
  size = input()
  a = map(int, input().split())
  a = merge_sort(a)
  
  alice_res = 0
  bob_res = 0
  
  for i in range(len(a)):
    if i%2 == 0:
      alice_res += a[i]
    else:
      bob_res += a[i]
 
  print(alice_res-bob_res)
  

def merge_sort(array):
  if len(array)<=1:
    return array
  
  spl_size = len(array)//2
  
  left_list = merge_sort(array[:spl_size])
  right_list = merge_sort(array[spl_size:])
  
  return merge_list(left_list, right_list)


def merge_list(left_list, right_list):
  left_index = 0
  right_index = 0
  sorted_list = []
  
  while left_index<len(left_list) and right_index<len(right_list):
    if left_list[left_index] < right_list[right_index]:
      sorted_list.append(right_list[right_index])
      right_index+=1
    else:
      sorted_list.append(left_list[left_index])
      left_index+=1
      
  if left_index == len(left_list):
    sorted_list.extend(right_list[right_index:])
  if right_index == len(right_list):
    sorted_list.extend(left_list[left_index:])
      
  return sorted_list
    
                          
main()
Problem p03470 (python)

Fixed submission:
def main():
  array = []
  
  size = int(input())
  for i in range(size):
    array.append(int(input()))
    
  array.sort(reverse=True)
  
  result = 1
  for i in range(len(array)-1):
    if array[i] != array[i+1]:
      result+=1
  
  print(result)
    
    
main()

Buggy submission (verdict: Runtime Error):
def main():
  array = []
  
  size = input()
  for i in range(size):
    array.append(int(input()))
    
  array.sort(reverse=True)
  
  result = 1
  for i in range(len(array)-1):
    if array[i] != array[i+1]:
      result+=1
  
  print(result)
    
    
main()
Problem p03478 (python)

Fixed submission:
def main():
    N, A, B = [int(_) for _ in input().split()]

    ans = 0

    for num in range(1, N + 1):
        if A <= sum(map(int, list(str(num)))) <= B:
            ans += num

    print(ans)

main()

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

for i in range(1:n+1):
  sum = 0
  j=0
  while True:
    num = i/(10**j)%10
    if num != 0:
      sum += num
      j+=1
    else:
      break
  if a<=sum && sum<=b:
    res += sum;

print(res)
Problem p03493 (python)

Fixed submission:
a = input()
cnt = 0
for i in a:
  if i == '1':
    cnt+=1
    
print(cnt)

Buggy submission (verdict: Runtime Error):
import sys
 
size = int(input())
a = map(int, input().split())
cnt = 0
 
while True:
  for i in range(size):
    if(a[i]%2 == 1):
      print(cnt)
      sys.exit()
    
  a = list(map(lambda x:x/2, a))
  cnt+=1

Buggy submission (verdict: Runtime Error):
import sys

size = int(input())
a = map(int, input().split())
cnt = 0

while true:
  for i in range(size):
    if(a[i]%2 == 1):
      print(cnt)
      sys.exit()
    
  a = map(lambda x:x/2, a)
  cnt +=1

Buggy submission (verdict: Runtime Error):
loop = input()
a = map(int, input().split())
cnt = 0
 
while(1):
  flg = 0
  for i in a:
    if(a%2 == 1):
      flg = 1
      break
      
  if(flg == 0):
    a = map(lambda x:x/2, a)
    cnt += 1
  else:
    break
 
print(cnt)

Buggy submission (verdict: Runtime Error):
loop = input()
a = map(int, input().split())
cnt = 0
 
while(1):
  flg = 0
  for i in a:
    if(a%2 == 1):
      flg = 1
      
  if(flg == 0):
    a = map(lambda x:x/2, a)
    cnt += 1
  else:
    break
 
print(cnt)

Buggy submission (verdict: Runtime Error):
loop = input()
a = map(int, input().split())
cnt = 0
 
while(1):
  flg = 0
  for i in a:
    if(a%2 == 1):
      flg = 1
      
  if(flg == 0):
    a = map(lamda x:x/2, a)
    cnt += 1
  else:
    break
 
print(cnt)
Problem p03494 (python)

Fixed submission:
import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()

Buggy submission (verdict: Runtime Error):
import sys
 
size = int(input())
a = map(int, input().split())
cnt = 0
 
while True:
  for i in range(size):
    if(a[i]%2 == 1):
      print(cnt)
      sys.exit()
    
  a = list(map(lambda x:x/2, a))
  cnt+=1

Buggy submission (verdict: Runtime Error):
import sys

size = int(input())
a = map(int, input().split())
cnt = 0

while True:
  for i in range(size):
    if(a[i]%2 == 1):
      print(cnt)
      sys.exit()
    
  a = map(lambda x:x/2, a)
  cnt+=1

Buggy submission (verdict: Runtime Error):
import sys

size = int(input())
a = map(int, input().split())
cnt = 0

while true:
	for i in range(size):
      if(a[i]%2 == 1):
        print(cnt)
        sys.exit()
    
    a = map(lambda x:x/2, a)
    cnt +=1

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

while(1):
  flg = 0
  for i in a:
    if(a%2 == 1):
      flg = 1
    else:
      i = i/2
      
  if(flg == 0):
    cnt += 1
  else:
    break

print(cnt)
Problem p02765 (python)

Fixed submission:
import sys
n,r = list(map(int, input().split()))
if n >= 10:
    print(r)
else:
    print(r + 100*(10-n))

Buggy submission (verdict: Runtime Error):
import sys
n,r = list(map(int, input().split()))
if n >= 10:
    print(n)
else:
    print(n - 100*(10-k))
Problem p02911 (python)

Fixed submission:
n,k,q = list(map(int, input().split()))
a = [0]*n
for i in range(q):
    tmp = int(input())
    a[tmp-1] += 1

b = ["No"]*n
    

for i in range(n):
    if k - q + a[i] > 0 :
        b[i] = "Yes"

for i in range(n):
    print(b[i])

Buggy submission (verdict: Runtime Error):
n,k,q = list(map(int, input().split()))
a = [0]*q
for i in range(q):
    tmp = int(input())
    a[tmp-1] += 1

b = ["No"]*n
    

for i in range(n):
    if k - q + a[i] > 0 :
        b[i] = "Yes"

for i in range(n):
    print(b[i])
Problem p02952 (python)

Fixed submission:
n = input()
keta = len(n)
n = int(n)

if keta == 1:
    print(n)
elif keta == 2:
    print(9)
elif keta == 3:
    print(n - 90)
elif keta == 4:
    print(909)
elif keta == 5:
    print(n - 9000  - 90 )
else:
    print(90909)

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

if keta == 1:
    print(n)
elif keta == 2:
    print(9)
elif keta == 3:
    print(n - 90 + 9)
elif keta == 4:
    print(909)
elif keta == 5:
    print(n - 9000 + 900 - 90 + 9)
else:
    print(90909)
Problem p02993 (python)

Fixed submission:
import sys
s = input()
for i in range(3):
    if s[i] == s[i+1]:
        print("Bad")
        sys.exit()
print("Good")

Buggy submission (verdict: Runtime Error):
import fractions
a,b,c,d = list(map(int, input().split()))
a -= 1
l = c/fractions.gcd(c,d)*d
b = b - b //c - b // d + b //l
a = a - a //c - a // d + a //l
print("{:.0f}".format(b-a))
Problem p03006 (python)

Fixed submission:
import sys
import collections
n = int(input())
z = [list(map(int, input().split())) for _ in range(n)]
z.sort()
pq_pattern = []
pq_counter = [1]*(n-1)*n

if n == 1:
    print(1)
    sys.exit()

for i in range(n):
    for j in range(n):
        if not i == j:
            if [z[j][0] - z[i][0], z[j][1] - z[i][1]] in pq_pattern:
                #print("YES!")
                pq_counter[pq_pattern.index([z[j][0] - z[i][0], z[j][1] - z[i][1]])] += 1
            else:
                pq_pattern.append([z[j][0] - z[i][0], z[j][1] - z[i][1]])
print(n-max(pq_counter))

Buggy submission (verdict: Runtime Error):
n = int(input())
z = [list(map(int, input().split())) for _ in range(n)]
z.sort()
pq_pattern = []
pq_counter = [1]*(n-1)

for i in range(n-1):
    #print([z[i+1][0] - z[i][0], z[i+1][1] - z[i][1]])
    if [z[i+1][0] - z[i][0], z[i+1][1] - z[i][1]] in pq_pattern:
        #print("YES!")
        pq_counter[pq_pattern.index([z[i+1][0] - z[i][0], z[i+1][1] - z[i][1]])] += 1
    else:
        pq_pattern.append([z[i+1][0] - z[i][0], z[i+1][1] - z[i][1]])
print(n - max(pq_counter))
#print(pq_counter)
#print(pq_pattern)
#print(z)

Buggy submission (verdict: Runtime Error):
n = int(input())
z = [list(map(int, input().split())) for _ in range(n)]
z.sort()
pq_pattern = []
pq_counter = [0]*(n-1)

for i in range(n-1):
    #print([z[i+1][0] - z[i][0], z[i+1][1] - z[i][1]])
    if [z[i+1][0] - z[i][0], z[i+1][1] - z[i][1]] in pq_pattern:
        pq_counter[pq_pattern.index([z[i+1][0] - z[i][0], z[i+1][1] - z[i][1]])] += 1
    else:
        pq_pattern.append([z[i+1][0] - z[i][0], z[i+1][1] - z[i][1]])
print(1+max(pq_counter))
Problem p03059 (python)

Fixed submission:
import sys
a,b,t = list(map(int, input().split()))
print(b*(t//a))

Buggy submission (verdict: Runtime Error):
import sys
a,b,t = list(map(int, input().split()))
print(b*(c//a))
Problem p03087 (python)

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

t=[0]*n

s=s.replace("AC", "Ac")
#s=s.translate(str.maketrans({'AC':'aC'})) maketransは置換元一文字じゃないといけんみたい
for i in range(n):
  if s[i] == "c":
    if i !=0:
      t[i]=1+t[i-1]
    else:
      t[i]=1
  else:
    t[i]=t[i-1]

#print(t)
for _ in range(q):
  l,r=list(map(int, input().split()))
  print(t[r-1]-t[l-1])

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

for i in range(q):
  a,b=list(map(int, input().split()))
  counter=0
 
  for j in range(len(s)-1):
    if S[a-1:b][j] == "A":
      if S[a-1:b][j+1] == "C":
        counter +=1

  print(counter)
Problem p03106 (python)

Fixed submission:
a,b,k = list(map(int, input().split()))
x=[]

for i in range(1, min(a, b)+1):
    if a%i == 0 and b%i==0:
      x.append(i)

x.sort(reverse=True)
print(x[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k = list(map(int, input().split()))
x=[]

for i in range(1, min(a, b)):
    if a%i == 0 and b%i==0:
      x.append(i)

x.sort(reverse=True)
print(x[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k = list(map(int, input().split()))
x=[]

for i in range(1, min(a, b)):
    if a%i == 0 and b%i==0:
      x.append(i)

x.sort(reverse=True)
print(x[k-1])
Problem p03109 (python)

Fixed submission:
y,m,d = list(map(int, input().split("/")))

if y < 2019:
  print(Heisei)
elif y ==2019 and m <=4:
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
y,m,d = list(map(int, input().split("/")))

if y < 2019 or (y =2019 and m <=4):
  print(Heisei)
else:
  print(TBD)
Problem p03126 (python)

Fixed submission:
n,m = list(map(int, input().split()))
counter = [0]*m
#min = m

for i in range(n):
  k,*b = input().split()
  b = [int(j) for j in b]
  for l in b:
    counter[l-1] +=1
    
print(counter.count(n))

Buggy submission (verdict: Runtime Error):
n,m = list(map(int, input().split()))
counter = [0 for _ in range(m)]
#min = m

for i in range(n):
  k,*b = input().split()
  b = [int(j) for j in b]
  for l in b:
    counter[l] +=1
    
print(counter.count(n))
Problem p03206 (python)

Fixed submission:
D = int(input())
 
if D == 25:
  print("Christmas")
elif D == 24:
  print("Christmas Eve")
elif D == 23:
  print("Christmas Eve Eve")
elif D == 22:
  print("Christmas Eve Eve Eve")

Buggy submission (verdict: Runtime Error):
D = int(input())
 
if D = 25:
  print("Chrismas")
elif D = 24:
  print("Chrismas Eve")
elif D = 23:
  print("Chrismas Eve Eve")
elif D = 22:
  print("Chrismas Eve Eve Eve")

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

if D = 25:
  print(Chrismas)
elif D = 24:
  print(Chrismas Eve)
elif D = 23:
  print(Chrismas Eve Eve)
elif D = 22:
  print(Chrismas Eve Eve Eve)
Problem p03210 (python)

Fixed submission:
x=int(input())
 
print("YES" if x==7 or x==5 or x==3 else "NO")

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

print("YES" if x==7orx==5orx==3 else "NO")

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

print(YES if x=7orx=5orx=3 else NO)
Problem p03220 (python)

Fixed submission:
n=int(input())
t,a=list(map(int,input().split()))
h=list(map(int,input().split()))
imin=100000
suf=0
for i in range(n):
  h[i]=t- h[i]*0.006
  if a>=h[i]:
    if imin>a-h[i]:
      #print("!!",a-h[i],h[i],i)
      imin=abs(a- h[i])
      suf=i
  else:
    if imin>h[i]-a:
      #print("!!",a-h[i],h[i],i)
      imin=abs( h[i]-a)
      suf=i 
print(suf+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t,a=list(map(int,input().split()))
h=list(map(int,input().split()))
imin=100000
suf=0
for i in range(n):
  h[i]=t- h[i]＊0.006
  if imin > abs(a- h[i]):
    imin=abs(a- h[i])
    suf=i
print(i)
Problem p03238 (python)

Fixed submission:
n = int(input())
 
if n == 1:
  print("Hello World")
else:
  a = int(input())
  b = int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(input())
 
if n == 1:
  print("Hello World")
else:
  a = int(input())
  b = int(input())
  print(A+B)

Buggy submission (verdict: Runtime Error):
n = int(input())
 
if n == 1:
  print("Hello World")
else n == 2:
  a = int(input())
  b = int(input())
  print(A+B)

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

if n == 1:
  print("Hello World")
else n == 2:
  print(A+B)