Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())  
red_li = [list(map(int, input().split())) for _ in range(n)]
blue_li = [list(map(int, input().split())) for _ in range(n)]
ans = 0
red_li.sort(reverse = True, key = lambda x : (x[0], x[1]))
blue_li.sort( key = lambda x : (x[0], x[1]))

def count(red, blue, used_red, used_blue):
    used_red = []
    used_blue = []
    for i in red:
        if i in used_red:
            continue
        for j in blue:
            if j in used_blue:
                continue
            if i[0] < j[0] and i[1] < j[1]:
                used_red.append(i)
                used_blue.append(j)
                break
    return len(used_red)

ans = count(red_li, blue_li)
red_li.sort(reverse = True,key = lambda x : (x[1], x[0]))
blue_li.sort( key = lambda x : (x[1], x[0]))
ans = max(ans, count(red_li, blue_li))
red_li.sort(reverse = True,key = lambda x : (x[1], x[0]))
blue_li.sort( key = lambda x : (x[0], x[1]))
ans = max(ans, count(red_li, blue_li))
red_li.sort(reverse = True,key = lambda x : (x[0], x[1]))
blue_li.sort( key = lambda x : (x[1], x[0]))
ans = max(ans, count(red_li, blue_li))
print(ans)

Fixed submission:
n = int(input())  
red_li = [list(map(int, input().split())) for _ in range(n)]
blue_li = [list(map(int, input().split())) for _ in range(n)]
ans = 0
red_li.sort(reverse = True, key = lambda x : (x[0], x[1]))
blue_li.sort( key = lambda x : (x[0], x[1]))

def count(red, blue):
    used_red = []
    used_blue = []
    for i in red:
        if i in used_red:
            continue
        for j in blue:
            if j in used_blue:
                continue
            if i[0] < j[0] and i[1] < j[1]:
                used_red.append(i)
                used_blue.append(j)
                break
    return len(used_red)

ans = count(red_li, blue_li)
red_li.sort(reverse = True,key = lambda x : (x[1], x[0]))
blue_li.sort( key = lambda x : (x[1], x[0]))
ans = max(ans, count(red_li, blue_li))
red_li.sort(reverse = True,key = lambda x : (x[1], x[0]))
blue_li.sort( key = lambda x : (x[0], x[1]))
ans = max(ans, count(red_li, blue_li))
red_li.sort(reverse = True,key = lambda x : (x[0], x[1]))
blue_li.sort( key = lambda x : (x[1], x[0]))
ans = max(ans, count(red_li, blue_li))
print(ans)
Buggy python submission (verdict: Runtime Error):

li = [list(map(int, input().split())) for _ in range(3)]
sum1 = li[0][0] + li[1][1] + li[2][2]
sum2 = li[1][0] + li[2][1] + li[0][2]
sum3 = li[2][0] + li[3][1] + li[1][2]
if sum1 ==sum2 and sum2 == sum3:
    print("Yes")
else:
    print("No")

Fixed submission:

li = [list(map(int, input().split())) for _ in range(3)]
sum1 = li[0][0] + li[1][1] + li[2][2]
sum2 = li[1][0] + li[2][1] + li[0][2]
sum3 = li[2][0] + li[0][1] + li[1][2]
if sum1 ==sum2 and sum2 == sum3:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
li = list(map(int, input().split()))
num = list(set(li))
ans = 0
for i in num:
    count = li.count(i) 
    ans += count
    if count >= i:
        ans -= i

print(ans)

Fixed submission:
n = int(input())
li = list(map(int, input().split()))
num = list(set(li))
num.sort()
ans = 0
sums = 0
for index, i in enumerate(num):
    if i > n - sums:
        ans += n-sums
        break
    count = li.count(i) 
    ans += count
    if count >= i:
        ans -= i
    sums += count
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
input()
s = input()

def find_cost(s):
    counter, i, j = 0, 0, len(s)-1
    while i < j:
        while i < len(s) and s[i] != 'W':
                i += 1
        while j >= 0 and s[j] != 'R':
                j -= 1
        if i < j:
            s = list(s)
            s[i], s[j] = s[j], s[i]
            s = "".join(s)
            counter += 1
        i += 1
        j -= 1

    # print(counter)

    for i in range(0, len(s) - 2):
        if s[i] == 'W' and s[i + 1] == 'R':
            counter += 1

    print(counter)


find_cost(s)

Fixed submission:
input()
s = input()

def find_cost(s):
    counter, i, j = 0, 0, len(s)-1
    while i < j:
        while i < len(s) and s[i] != 'W':
                i += 1
        while j >= 0 and s[j] != 'R':
                j -= 1
        if i < j:
            # s = list(s)
            s[i], s[j] = s[j], s[i]
            # s = "".join(s)
            counter += 1
        i += 1
        j -= 1

    # print(counter)

    for i in range(0, len(s) - 2):
        if s[i] == 'W' and s[i + 1] == 'R':
            counter += 1

    print(counter)

s = list(s)
find_cost(s)
Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
a_list = list(map(int,input().split()))
import math
result = 0
check = True
for a in a_list:
  if a == 0:
    check = False
    break
  else:
    result += math.log10(a)
if check == False:
  print(0)
elif 10**result > 18:
  print(-1)
else:
  print(int(10**result))
  
  

Fixed submission:
n = int(input())
a_list = list(map(int,input().split()))
result = 1
if 0 in a_list:
  print(0)
else:
  for a in a_list:
    result = result *a
    if len(str(result)) >= 19:
      if result == 10**18:
        continue
      else:
        result = -1
        break
        
  print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_list = list(map(int,input().split()))
result = 1
for i in range(n):
  result = result * a_list[i]
  
if result > 10**18:
  print(-1)
else:
  print(result)

Fixed submission:
n = int(input())
a_list = list(map(int,input().split()))
result = 1
if 0 in a_list:
  print(0)
else:
  for a in a_list:
    result = result *a
    if len(str(result)) >= 19:
      if result == 10**18:
        continue
      else:
        result = -1
        break
        
  print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_list = list(map(int,input().split()))
result = 1
for a in a_list:
  result = result * a
  
if result > 10**18:
  print(-1)
else:
  print(result)

Fixed submission:
n = int(input())
a_list = list(map(int,input().split()))
result = 1
if 0 in a_list:
  print(0)
else:
  for a in a_list:
    result = result *a
    if len(str(result)) >= 19:
      if result == 10**18:
        continue
      else:
        result = -1
        break
        
  print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_list = list(map(int,input().split()))
result = 1
for a in a_list:
  result = result * a
  
if result > 10**18:
  print(-1)
else:
  print(result)

Fixed submission:
n = int(input())
a_list = list(map(int,input().split()))
result = 1
if 0 in a_list:
  print(0)
else:
  for a in a_list:
    result = result *a
    if len(str(result)) >= 19:
      if result == 10**18:
        continue
      else:
        result = -1
        break
        
  print(result)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
m_load = [[] for i in range(n)]
for j in range(m):
  a,b = map(int,input().split())
  a = a-1
  b = b-1
  m_load[a].append(b)
  m_load[b].append(a)

import heapq

def dijkstra(edges,num_v,start,goal):
      dist = [float("inf")] * num_v
      dist[start] = 0
      q = []
      heapq.heappush(q,[0,[start]])#[0,0]とは1番目に頂点のインデックス、0番目に頂点までのコストを格納する
    
      while len(q) >0:
        #ヒープから取り出し
        _,u = heapq.heappop(q)
        last = u[-1]
        if last == goal:
          return u
        for i in edges[last]:
            if dist[i] > dist[last] + 1:
                #頂点までのコストが更新できれば更新してヒープに登録
                dist[i] = dist[last] + 1
                heapq.heappush(q,[dist[last] + 1,u + [i]])
      return []

result = []
check = True
for i in range(1,n):
  r = dijkstra(m_load,n,i,0)
  if len(r) >= 2:
    
    result.append(r[1] + 1)
  else:
    check = False
if check == False:
  print("No")
else:
  print("Yes")
  for _ in result:
    print(_)

Fixed submission:
from collections import deque
n,m = map(int,input().split())
edge_list = [[] for i in range(n)]
depth_list = [-1 for i in range(n)]
ans_list = [-1 for i in range(n)]
depth_list[0] = 0
ans_list[0] = 0
for m in range(m):
  a,b = map(int,input().split())
  a = a-1
  b = b-1
  edge_list[a].append(b)
  edge_list[b].append(a)
q = deque()
q.append(0)

while len(q) > 0:
  node = q.popleft()
  connects = edge_list[node]
  for c in connects:
    if depth_list[c] == -1:
      depth_list[c] = depth_list[node] + 1
      q.append(c)
      ans_list[c] = node
      
if -1 in ans_list:
  print("No")
else:
  print("Yes")
  for _ in ans_list[1:]:
    print(_ + 1)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
a_list = list(map(int,input().split()))
past_a = [1]
first = 0
for i in range(1,n+1):
  if a_list[past_a[-1] - 1] in past_a:
    first = i
    past_a.append(a_list[past_a[-1] - 1])
    break
  else:
    past_a.append(a_list[past_a[-1] - 1])
roop = past_a.index(a_list[first])
unit = first - roop
unit_a = past_a[roop:first]
k = (k-first) % unit
print(unit_a[k])


Fixed submission:
n,k = map(int,input().split())
a_list = list(map(int,input().split()))
past_a = [1]
first = 0
for i in range(n):
    past_a.append(a_list[past_a[-1] - 1])
    
def check(past_a):
  if len(past_a) == len(set(past_a)):
    return True
  else:
    return False
  
left = 0
right = len(past_a)

while right - left > 1:
  middle = (right + left)//2
  if check(past_a[:middle]) == True:
    left = middle
  else:
    right = middle
roop_2 = left 
roop_1 = past_a.index(past_a[roop_2])
unit = roop_2 - roop_1
p_unit = past_a[roop_1:roop_2]
if k <= left:
  print(past_a[k])
else:
  k = (k - left) % unit
  print(p_unit[k])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_list = list(map(int,input().split()))
c_list = a_list.copy()
for i in range(n):
  a_list[i] -= i + 1
count = 0
for i in range(n-1):
  target = a_list[i+1:]
  count += target.count(-(c_list[i] + i + 1))
  
print(count)
  
  

Fixed submission:
n = int(input())
a_list = list(map(int,input().split()))
a_plus = {}
a_minus = {}
for i in range(1,n):
  a_minus[i] = 0
  
for i in range(n):
  minus = (i+1) - a_list[i]
  if 2 <= minus:
    a_minus[minus] += 1
  
count = 0

for j in range(n):
  plus = (j+1) + a_list[j]
  if plus <= n - 1:
    count += a_minus[plus]

    
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
import itertools
a_list = list(map(int,input().split()))
cand_list = list(itertools.combinations([i for i in range(n)],2))
count = 0
for cand in cand_list:
  if abs(cand[1] - cand[0]) == a_list[cand[0]] + a_list[cand[1]]:
    count += 1
    
print(count)


Fixed submission:
n = int(input())
a_list = list(map(int,input().split()))
a_plus = {}
a_minus = {}
for i in range(1,n):
  a_minus[i] = 0
  
for i in range(n):
  minus = (i+1) - a_list[i]
  if 2 <= minus:
    a_minus[minus] += 1
  
count = 0

for j in range(n):
  plus = (j+1) + a_list[j]
  if plus <= n - 1:
    count += a_minus[plus]

    
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
result = 0
import math
for a in range(1,n+1):
  for b in range(1,n+1):
    for c in range(1,n+1):
      result += math.gcd(math.gcd(a,b),c)
      
      
      
      
print(result)
      
  

Fixed submission:
import math
k = int(input())
result = 0
for a in range(1,k+1):
  for b in range(a,k+1):
    for c in range(b,k+1):
      s = set([a,b,c])
      if len(s) == 3:
        result += 6 * math.gcd(math.gcd(a,b),c)
      if len(s) == 2:
        result += 3 * math.gcd(math.gcd(a,b),c)
      if len(s) == 1:
        result += math.gcd(math.gcd(a,b),c)
      
       
        
      
      
      
      
print(result)
Buggy python submission (verdict: Runtime Error):
n = input()
k = int(input())
dp = [[[0 for i in range(len(n)+1)] for i in range(2)] for i in range(len(n)+1)]
dp[0][0][0] = 1
for a in range(len(n)):
  for b in range(2):
    for c in range(len(n)):
      for i in range(10):
        if b ==1:
          if i != 0:
            dp[a+1][1][c+1] += dp[a][1][c]
          else:
            dp[a+1][1][c] += dp[a][1][c]
        else:
          if int(n[a]) > i and i ==0:
            dp[a+1][1][c] += dp[a][0][c]
          if int(n[a]) > i and i != 0:
            dp[a+1][1][c+1] += dp[a][0][c]
          if int(n[a]) == i and i ==0:
            dp[a+1][0][c] += dp[a][0][c]
          if int(n[a]) == i and i !=0:
            dp[a+1][0][c+1] += dp[a][0][c]
if len(n) == 1:
	print(int(n))  
else:
  print(dp[-1][0][k] + dp[-1][1][k])


Fixed submission:
n,k = map(int,input().split())
gcd_num = [0 for i in range(k+1)]
c = 10**9 + 7
ans = 0
for i in range(k,0,-1):
  x = k//i
  #gcd = xを満たす何組あるかのあまりを計算
  #あまりを取らないとオーバーフローする
  gcd_num[i] = pow(x,n,c)
  #重複するのを取り除く
  for j in range(2,x+1):
    gcd_num[i] -= gcd_num[i * j]
  #最後にgcdの大きさによる重み付けする
  ans += gcd_num[i] * i
  
print(ans%c)
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())

if n == 0:
  print(0)
elif n % k==0:
  print(0)
else:
  while n > abs(n - k):
    n = abs(n - k)
  print(n)
    


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

if n == 0:
  print(0)
elif n % k==0:
  print(0)
elif n >k:
  while n > abs(n - k):
    n = min(abs(n - k),n % k)
  print(n)
else:
  while n > abs(n - k):
    n = abs(n - k)
  print(n)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
left = 0
right = 10**19

while right - left >1:
  middle = (right + left)//2
  if middle < abs(middle - k) :
    left = middle
  else:
    right = middle
if n < k and k //n == 2:
  print(n)
elif n//k ==2:
    print(0)
else:
  print(min(left,abs(n-k),n))

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

if n == 0:
  print(0)
elif n % k==0:
  print(0)
elif n >k:
  while n > abs(n - k):
    n = min(abs(n - k),n % k)
  print(n)
else:
  while n > abs(n - k):
    n = abs(n - k)
  print(n)
Buggy python submission (verdict: Runtime Error):
import heapq
k = int(input())
run_list = [i for i in range(1,10)]
heapq.heapify(run_list)
result = 0
for i in range(k):
  result = heapq.pop(run_list)
  if result % 10 ==0:
    new_1 = result * 10
    new_2 = result * 10 + 1
    heapq.heappush(run_list, new_1)
    heapq.heappush(run_list, new_2)
  elif result % 10 ==9:
    new_1 = result * 10 + 8
    new_2 = result * 10 + 9
    heapq.heappush(run_list, new_1)
    heapq.heappush(run_list, new_2)
  else:
    new_1 = result * 10 + (resut % 10)
    new_2 = result * 10 + (resut % 10) + 1
    new_3 = result * 10 + (resut % 10) - 1
    heapq.heappush(run_list, new_1)
    heapq.heappush(run_list, new_2)
print(result)
    heapq.heappush(run_list, new_3)

Fixed submission:
import heapq
k = int(input())
run_list = [i for i in range(1,10)]
heapq.heapify(run_list)
result = 0
for i in range(k):
  result = heapq.heappop(run_list)
  if result % 10 ==0:
    new_1 = result * 10
    new_2 = result * 10 + 1
    heapq.heappush(run_list, new_1)
    heapq.heappush(run_list, new_2)
  elif result % 10 ==9:
    new_1 = result * 10 + 8
    new_2 = result * 10 + 9
    heapq.heappush(run_list, new_1)
    heapq.heappush(run_list, new_2)
  else:
    new_1 = result * 10 + (result % 10)
    new_2 = result * 10 + (result % 10) + 1
    new_3 = result * 10 + (result % 10) - 1
    heapq.heappush(run_list, new_1)
    heapq.heappush(run_list, new_2)
    heapq.heappush(run_list, new_3)
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
import collections
n = int(input())
a_list = list(map(int,input().split()))
c = collections.Counter(a_list)
for i in a_list:
  dic = c.copy()
  dic[i] = dic[i] - 1
  result = 0
  for s in dic.values():
    result += s*(s - 1)//2
  print(result)
    
  
  

Fixed submission:
import collections
n = int(input())
a_list = list(map(int,input().split()))
c = collections.Counter(a_list)
result = 0
for i in c.values():
  result += i * (i - 1)//2

for a in a_list:
  print(result - c[a] + 1)
Buggy python submission (verdict: Time Limit Exceeded):
import heapq
from collections import deque
s = input()
s_list = list(s)
q = int(input())
q_list = []
for i in range(q):
  q_list.append(list(map(str,input().split())))
check = 0
for list_ in q_list:
  if int(list_[0]) == 1:
    check += 1
  if int(list_[0]) == 2:
    if (int(list_[1]) + check) % 2 ==1:
      s_list = deque(s_list)
      s_list.appendleft(list_[2])
      s_list = list(s_list)
    else:
      s_list.append(list_[2])
if check % 2 == 1:
  s_list = s_list[::-1]
print("".join(s_list))
    

Fixed submission:
import heapq
from collections import deque
s = input()
s_list = list(s)
s_list = deque(s_list)
q = int(input())
q_list = []
for i in range(q):
  q_list.append(list(map(str,input().split())))
check = 0
for list_ in q_list:
  if int(list_[0]) == 1:
    check += 1
  if int(list_[0]) == 2:
    if (int(list_[1]) + check) % 2 ==1:
      s_list.appendleft(list_[2])
    else:
      s_list.append(list_[2])
s_list = list(s_list)
if check % 2 == 1:
  s_list = s_list[::-1]
print("".join(s_list))
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
p_list = list(map(int,input().split()))
ruiseki = []
a = 0
for i in range(n):
  a += p_list[i]
  ruiseki.append(a)
res = -1
val_list = []
for m in range(n-k):
  val = ruiseki[k+m] - ruiseki[m]
  val_list.append(val)
print((max(val_list)+k)/ 2) 


Fixed submission:
n,k = map(int,input().split())
p_list = list(map(int,input().split()))
ruiseki = []
a = 0
for i in range(n):
  a += p_list[i]
  ruiseki.append(a)
res = -1
val_list = []
for m in range(n-k):
  val = ruiseki[k+m] - ruiseki[m]
  val_list.append(val)
if n ==k :
  	print((sum(p_list) + k)/2)
else:
	print((max(val_list)+k)/ 2)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
p_list = list(map(int,input().split()))
ruiseki = []
a = 0
for i in range(n):
  a += p_list[i]
  ruiseki.append(a)
res = -1
for m in (n-k):
  val = ruiseki[k+i] - ruiseki[i]
  if val > res:
    res = val
print(val) 

Fixed submission:
n,k = map(int,input().split())
p_list = list(map(int,input().split()))
ruiseki = []
a = 0
for i in range(n):
  a += p_list[i]
  ruiseki.append(a)
res = -1
val_list = []
for m in range(n-k):
  val = ruiseki[k+m] - ruiseki[m]
  val_list.append(val)
if n ==k :
  	print((sum(p_list) + k)/2)
else:
	print((max(val_list)+k)/ 2)

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
p_list = list(map(int,input().split()))
result_list = []
for i in range(n-k+1):
  p_part = p_list[i:i+k]
  result = 0
  for p in p_part:
    result += (p + 1)/2
  result_list.append(result)
print(max(result_list))
  

Fixed submission:
n,k = map(int,input().split())
p_list = list(map(int,input().split()))
ruiseki = []
a = 0
for i in range(n):
  a += p_list[i]
  ruiseki.append(a)
res = -1
val_list = []
for m in range(n-k):
  val = ruiseki[k+m] - ruiseki[m]
  val_list.append(val)
if n ==k :
  	print((sum(p_list) + k)/2)
else:
	print((max(val_list)+k)/ 2)
Buggy python submission (verdict: Time Limit Exceeded):
h,n = map(int,input().split())
a_list = list(map(int,input().split()))
def part_sum(a,A):
    #初期化
    N = len(a)
    dp = [[0 for i in range(A+1)] for j in range(N + 1)]
    dp[0][0] = 1
    
    #DP
    for i in range(N):
        for j in range(A+1):
            if a[i] <= j :
                dp[i + 1][j] = dp[i][j - a[i]] or dp[i][j]
            else :
                dp[i +1][j] = dp[i][j]
    return dp[N][A]
if part_sum(a_list,h) ==0:
  print("No")
else:
  print("Yes")

Fixed submission:
h,n = map(int,input().split())
a_list = list(map(int,input().split()))
if sum(a_list) >= h:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n % 2 == 1:
  print(0)
else:
  first = 10
  count = 0
  if n >= first:
    while n >= first:
      count += n //first
      first = 5 *first
  
print(count)
  



  

Fixed submission:
n = int(input())
if n % 2 == 1:
  print(0)
else:
  first = 10
  count = 0
  if n >= first:
    while n >= first:
      count += n //first
      first = 5 *first
  
  print(count)

Buggy python submission (verdict: Runtime Error):
n = int(input())
if n % 2 == 1:
  print(0)
else:
  first = 10
  count = 0
  while n >= first:
    count += n //first
    first = 5 *first
print(count)
  



  

Fixed submission:
n = int(input())
if n % 2 == 1:
  print(0)
else:
  first = 10
  count = 0
  if n >= first:
    while n >= first:
      count += n //first
      first = 5 *first
  
  print(count)
Buggy python submission (verdict: Runtime Error):
x = int(input())
dp = [0]*x*100
dp[0] = 1
for i in range(x):
  if dp[i] == 1:
    dp[i + 100] =1
    dp[i + 101] =1
    dp[i + 102] =1
    dp[i + 103] =1
    dp[i + 104] =1
    dp[i + 105] =1
if dp[x] ==1:
  print(1)
else :
  print(0)

  
      
  
      

Fixed submission:
x = int(input())
dp = [0]*(x + 106)
dp[0] = 1
for i in range(x):
  if dp[i] == 1:
    dp[i + 100] =1
    dp[i + 101] =1
    dp[i + 102] =1
    dp[i + 103] =1
    dp[i + 104] =1
    dp[i + 105] =1
if dp[x] ==1:
  print(1)
else :
  print(0)

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
item_list = [100,101,102,103,104,105] * 1000
def part_sum(a,A):
    #初期化
    N = len(a)
    dp = [[0 for i in range(A+1)] for j in range(N + 1)]
    dp[0][0] = 1
    
    #DP
    for i in range(N):
        for j in range(A+1):
            if a[i] <= j :
                dp[i + 1][j] = dp[i][j - a[i]] or dp[i][j]
            else :
                dp[i +1][j] = dp[i][j]
    return dp[N][A]

print(part_sum(item_list,x))

Fixed submission:
x = int(input())
dp = [0]*(x + 106)
dp[0] = 1
for i in range(x):
  if dp[i] == 1:
    dp[i + 100] =1
    dp[i + 101] =1
    dp[i + 102] =1
    dp[i + 103] =1
    dp[i + 104] =1
    dp[i + 105] =1
if dp[x] ==1:
  print(1)
else :
  print(0)
Buggy python submission (verdict: Runtime Error):
import math
n = input()
n = int(n)
spl_list = [1]
for i in range(1,round(math.sqrt(n)) + 1):
  if n % i == 0:
    spl_list.append(i)

max_i = max(spl_list)
max_j = n / max_i
print(round(max_i + maxj -2))
  

Fixed submission:
import math
n = input()
n = int(n)
spl_list = [1]
for i in range(1,round(math.sqrt(n)) + 1):
  if n % i == 0:
    spl_list.append(i)

max_i = max(spl_list)
max_j = n / max_i
print(round(max_i + max_j -2))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l_list = list(map(int,input().split()))
l_list.sort()
import bisect
count = 0
for i in range(1,n):
  for j in range(i+1,n):
    b = l_list[i]
    c = l_list[j]
    a_cand = l_list[:i]
    border = c-b
    count += len(a_cand) - bisect.bisect_right(a_cand,border)
print(count)    
    
    

Fixed submission:
n = int(input())
l_list = list(map(int,input().split()))
l_list.sort()
import bisect
count = 0
for i in range(1,n):
  for j in range(i+1,n):
    b = l_list[i]
    c = l_list[j]
    a_cand = l_list[:i]
    border = c-b
    count += len(a_cand) - bisect.bisect_right(a_cand,border)
print(count)