Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
def solve(n, m, work_list):
    # 1-origin
    dp = [[0] * (m + 1) for i in range(n + 1)]

    # time O(N log(N))
    work_list.sort()

    # time O(NM)
    for key, value in enumerate(work_list, 1):
        work_day, work_value = value[0], value[1]
        prev_key = key - 1
        for day in range(1, m + 1):
            prev_day = day - 1
            dp[key][day] = dp[prev_key][day]
            if day >= work_day:
                dp[key][day] = max(dp[key][day], dp[prev_key][prev_day] + work_value)

    return dp[n][m]


def main():
    n, m = map(int, input().split())

    work_list = []
    # time O(N)
    for i in range(n):
        work = list(map(int, input().split()))
        if work[0] > m:
            continue
        work_list.append(work)

    ans = solve(n, m, work_list)
    print(ans)


main()


Fixed submission:
import heapq


def solve(m, work_map):
    days = work_map.keys()
    ans = 0
    priority_queue = []

    for day in range(1, m + 1):
        if day in days:
            for value in work_map[day]:
                heapq.heappush(priority_queue, -value)
        if len(priority_queue):
            value = -heapq.heappop(priority_queue)
            ans += value

    return ans


def main():
    n, m = map(int, input().split())

    work_map = {}
    # time O(N)
    for i in range(n):
        day, value = list(map(int, input().split()))
        if day > m:
            continue
        if day in work_map.keys():
            work_map[day].append(value)
        else:
            work_map[day] = [value]

    ans = solve(m, work_map)
    print(ans)


main()
Buggy python submission (verdict: Runtime Error):
def solve(n, traffic_list):
    min_val = min(traffic_list)
	if n % min_val == 0:
        return n // min_val + len(traffic_list) - 1
    else:
        return n // min_val + len(traffic_list)


def main():
    n = int(input())
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

    ans = solve(n, [a, b, c, d, e])
    print(ans)


main()


Fixed submission:
def solve(n, traffic_list):
    min_val = min(traffic_list)
    if n % min_val == 0:
        return n // min_val + len(traffic_list) - 1
    else:
        return n // min_val + len(traffic_list)


def main():
    n = int(input())
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

    ans = solve(n, [a, b, c, d, e])
    print(ans)


main()
Buggy python submission (verdict: Time Limit Exceeded):
def solve(memo, left, right):
    count = 0
    for num in memo:
        if left <= num <= right:
            count += 1
    return count


def main():
    length, questions = map(int, input().split())
    string = input()

    memo = []
    for key in range(length - 1):
        if string[key:key+2] == "AC":
            memo.append(key + 1)

    for question in range(questions):
        left, right = map(int, input().split())
        right -= 1
        ans = solve(memo, left, right)
        print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
import bisect


def solve(memo, left, right):
    left_key = bisect.bisect_left(memo, left)
    right_key = bisect.bisect_right(memo, right)
    return right_key - left_key


def main():
    length, questions = map(int, input().split())
    string = input()

    memo = []
    for key in range(length - 1):
        if string[key:key+2] == "AC":
            memo.append(key + 1)

    for question in range(questions):
        left, right = map(int, input().split())
        right -= 1
        ans = solve(memo, left, right)
        print(ans)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import bisect


def solve(a_list, b_list, position):
    # time O(log(A))
    a_right_key = bisect.bisect_left(a_list, position)
    a_left_key = a_right_key - 1
    # time O(log(B))
    b_right_key = bisect.bisect_left(b_list, position)
    b_left_key = b_right_key - 1

    a_left, a_right = a_list[a_left_key], a_list[a_right_key]
    b_left, b_right = b_list[b_left_key], b_list[b_right_key]

    ans = 10 ** 20
    for a_position in [a_left, a_right]:
        for b_position in [b_left, b_right]:
            distance1 = abs(position - a_position) + abs(a_position - b_position)
            distance2 = abs(position - b_position) + abs(a_position - b_position)
            ans = min(ans, distance1, distance2)
    return ans


def main():
    inf = 10 ** 20
    A, B, Q = map(int, input().split())

    # time O(A)
    a_list = [int(input()) for _ in range(A)]
    a_list = [-inf] + a_list + [inf]
    # time O(B)
    b_list = [int(input()) for _ in range(A)]
    b_list = [-inf] + b_list + [inf]

    # time O(Q (log(A) + log(B))
    for _ in range(Q):
        position = int(input())
        ans = solve(a_list, b_list, position)
        print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
import bisect


def solve(a_list, b_list, position):
    # time O(log(A))
    a_right_key = bisect.bisect_left(a_list, position)
    a_left_key = a_right_key - 1
    # time O(log(B))
    b_right_key = bisect.bisect_left(b_list, position)
    b_left_key = b_right_key - 1

    a_left, a_right = a_list[a_left_key], a_list[a_right_key]
    b_left, b_right = b_list[b_left_key], b_list[b_right_key]

    ans = 10 ** 20
    for a_position in [a_left, a_right]:
        for b_position in [b_left, b_right]:
            distance1 = abs(position - a_position) + abs(a_position - b_position)
            distance2 = abs(position - b_position) + abs(a_position - b_position)
            ans = min(ans, distance1, distance2)
    return ans


def main():
    inf = 10 ** 20
    A, B, Q = map(int, input().split())

    # time O(A)
    a_list = [int(input()) for _ in range(A)]
    a_list = [-inf] + a_list + [inf]
    # time O(B)
    b_list = [int(input()) for _ in range(B)]
    b_list = [-inf] + b_list + [inf]

    # time O(Q (log(A) + log(B))
    for _ in range(Q):
        position = int(input())
        ans = solve(a_list, b_list, position)
        print(ans)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def solve(n, k, h_list):
    inf = 10 ** 9
    dp = [inf] * n
    dp[0] = 0

    for i in range(1, n):
        for j in range(1, k + 1):
            if i - j < 0:
                continue
            dp[i] = min(dp[i], dp[i - j] + abs(h_list[i] - h_list[i - j]))

    return dp[n - 1]


def main():
    n, k = map(int, input().split())
    h_list = list(map(int, input().split()))

    ans = solve(n, k, h_list)
    print(ans)


main()

Fixed submission:
import numpy as np


def solve(n, k, h_list):
    dp = np.zeros(n, dtype=int)

    for end in range(1, n):
        start = max(0, end - k)
        dp[end] = np.min(dp[start:end] + np.abs(h_list[end] - h_list[start:end]))

    return dp[n - 1]


def main():
    n, k = map(int, input().split())
    h_list = np.array(input().split(), dtype=int)

    ans = solve(n, k, h_list)
    print(ans)


main()
Buggy python submission (verdict: Time Limit Exceeded):
def solve(n, w, items):
    # 1-origin
    dp = [[0] * (w + 1) for i in range(n + 1)]

    for i in range(1, n + 1):
        prev = i - 1
        weight, value = items[i - 1][0], items[i - 1][1]
        for j in range(1, w + 1):
            dp[i][j] = dp[prev][j]
            if j - weight >= 0:
                dp[i][j] = max(dp[i][j], dp[prev][j - weight] + value)

    return dp[n][w]


def main():
    n, w = map(int, input().split())

    items = []
    for i in range(n):
        items.append(list(map(int, input().split())))

    ans = solve(n, w, items)
    print(ans)


main()

Fixed submission:
import numpy as np


def solve(w, items):
    dp = np.zeros(w + 1, dtype=int)

    for weight, value in items:
        dp[weight:] = np.maximum(dp[weight:], dp[:w-weight+1] + value)

    return dp[w]


def main():
    n, w = map(int, input().split())
    items = list(list(map(int, input().split())) for _ in range(n))

    ans = solve(w, items)
    print(ans)


main()
Buggy python submission (verdict: Runtime Error):
import math
l = input().split()
print(math.ceil(l[0]/l[1]))


Fixed submission:
from math import ceil
H, A = map(int, input().split())
print(ceil(H/A))

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

def calc_atack(H, A, counter =0):
    H -= A
    counter += 1
    if H <= 0:
        return counter
    else:
        return calc_atack( H, A, counter = counter)


print(calc_atack(H, A))

Fixed submission:
import sys
sys.setrecursionlimit(100000) 
H, A = map(int, input().split())

def calc_atack(H, A, counter =0):
    H -= A
    counter += 1
    if H <= 0:
        return counter
    else:
        return calc_atack( H, A, counter = counter)


print(calc_atack(H, A))

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

def calc_atack(H, A, counter =0):
    H -= A
    counter += 1
    if H <= 0:
        return counter
    else:
        return calc_atack( H, A, counter = counter)


print(calc_atack(H, A))

Fixed submission:
import sys
sys.setrecursionlimit(100000) 
H, A = map(int, input().split())

def calc_atack(H, A, counter =0):
    H -= A
    counter += 1
    if H <= 0:
        return counter
    else:
        return calc_atack( H, A, counter = counter)


print(calc_atack(H, A))
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

result = s* t

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


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

result = a* b

if result % 2 == 0:
    print('Even')
else:
    print('Odd')
Buggy python submission (verdict: Runtime Error):
H,N = list(map(int,input().split()))
alist = list(map(int,input().split()))
if H <= sum(alist):
  print("Yes")
else:
  print("No")

Fixed submission:
h,d = list(map(int, input().split()))
c,m = divmod(h,d)
if 0 != m:
  m = 1
print(c+m)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
num, size = map(int,input().split())
data =[]
for x in range(num):
    data.append(input())
print(''.join(sorted(data)))

Fixed submission:
# coding: utf-8

data = list(map(int,input().split()))
if 2 == data.count(5) and 1 == data.count(7):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
num, size = map(int,input().split())
data =[]
for x in range(num):
    data.append(input())
print(''.join(sorted(data)))

Fixed submission:
# coding: utf-8

data = list(map(int,input().split()))
if 2 == data.count(5) and 1 == data.count(7):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
num, size = map(int,input().split())
data =[]
for x in range(num):
    data.append(input())
print(str.join(data.sort()))

Fixed submission:
# coding: utf-8

data = list(map(int,input().split()))
if 2 == data.count(5) and 1 == data.count(7):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
num, size = map(int,input().split())
data =[]
for x in range(num):
    data.append(input())
data.sort()
print(data.join())

Fixed submission:
# coding: utf-8

data = list(map(int,input().split()))
if 2 == data.count(5) and 1 == data.count(7):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
num, size = map(int,input().split())
data =[]
for x in range(num):
    data.append(input())
data.sort()
print(data.join())

Fixed submission:
# coding: utf-8

data = list(map(int,input().split()))
if 2 == data.count(5) and 1 == data.count(7):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
data = list(map(int,"5 7 5".split())
if 2 == data.count(5) and 1 == data.count(7):
    print("Yes")
else:
    print("No")

Fixed submission:
# coding: utf-8

data = list(map(int,input().split()))
if 2 == data.count(5) and 1 == data.count(7):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
num, size = map(int,input().split())
data =[]
for x in range(num):
    data.apend(input())
print(data.sort().join())

Fixed submission:
# coding: utf-8
num, size = map(int,input().split())
data =[]
for x in range(num):
    data.append(input())
print(''.join(sorted(data)))
Buggy python submission (verdict: Runtime Error):
a,b,k = map(int,input().split())

if k > a :
  print("0",b-(k-a))
elif k=<a:
  print(a-k,b)

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

if a+b > k:
  if k >a :
     print(0,b-(k-a))
  elif k<=a:
     print(a-k,b)
else:
  print(0,0)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a,b = input().split()
a = [i for i in a]
b = [i for i in b]
ans =""

for i in range(n):
  ans += a[n]
  ans += b[n]
print(ans)


Fixed submission:
n = int(input())
a,b = input().split()
a = list(a)
b = list(b)
ans =""
 
for i in range(n):
  ans += a[i]
  ans += b[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
 
print(a*b//math.gcd(a,b))

Fixed submission:
import fractions

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

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

print(a*b/math.gcd(a,b))

Fixed submission:
import fractions

a,b = map(int,input().split())
print(a*b//fractions.gcd(a,b))
Buggy python submission (verdict: Runtime Error):
n = int(input())
s input()
ans =""

for i in s:
  m = (ord(i)-ord("A")+n)%26
  ans += chr(m+ord("A"))

print(ans)

Fixed submission:
n = int(input())
s = input()
ans =""
 
for i in s:
  m = (ord(i)-ord("A")+n)%26
  ans += chr(m+ord("A"))
 
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())//2
s = input()

if [:n] == [n:]:
  print("Yes")
else:
  print("No")

Fixed submission:
n = int(input())//2
s = input()
 
if s[:n] == s[n:]:
  print("Yes")
else:
  print("No")

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

if n%2 == 0:
  for i in range(len(s)/2):
    if s[i] == s[-1-i]:
      cnt += 1
  if n/2 == cnt:
    print("Yes")
  else:
    print("No")
else:
  print("No")
    

Fixed submission:
n = int(input())//2
s = input()
 
if s[:n] == s[n:]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
d = list(map,input().split())
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(sum)

Fixed submission:
n = int(input())
d = list(map(int,input().split()))
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(sum)

Buggy python submission (verdict: Runtime Error):
s = int(input())
d = list(map,input().split())
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(sum)

Fixed submission:
n = int(input())
d = list(map(int,input().split()))
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(sum)

Buggy python submission (verdict: Runtime Error):
s = int(input())
d = list(map,input().split())
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(ans)

Fixed submission:
n = int(input())
d = list(map(int,input().split()))
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(sum)

Buggy python submission (verdict: Runtime Error):
s = int(input())
d = list(map,input().split())
sum = 0

for i in range(n):
  for j in range(i+1,n):
    sum += d[i]*d[j]
print(ans)
    

Fixed submission:
n = int(input())
d = list(map(int,input().split()))
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(sum)
Buggy python submission (verdict: Runtime Error):
k,x = int(input().split())

print(i for i in range(x+1-k,x+k))

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

print(" ".join(map(str,range(x-k+1,x+k))))
Buggy python submission (verdict: Runtime Error):
def main(Hitpoint,Attack):
  count_num = 0
  while true:
    Hitpoint -= Attack
    count_num += 1
    if Hitpoint <= 0:
      break

if __name__ == "__main__":
    inp=input()   
    main(inp.replace(' ', ','))

Fixed submission:
def main(Hitpoint,Attack):
  count_num = 0
  while True:
    Hitpoint -= Attack
    count_num += 1
    if Hitpoint <= 0:
      break
  return count_num
 
if __name__ == "__main__":
    inp=input().split()
    hitpoint = int(inp[0])
    attack = int(inp[1])
    print(main(hitpoint,attack))
Buggy python submission (verdict: Runtime Error):
def main(length_num,num_list):
    count_num = 0
    for i in range(0,length_num):
        flag_tag = True
        for j in range(0 , i ):
          if int(num_list[i]) >= int(num_list[j]):
              flag_tag = False
              break
        if flag_tag != False:
            count_num += 1
    return count_num


    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(length_num,num_list))

Fixed submission:
def main(test_case,clear_case):
    if test_case <= clear_case:
      return "Yes"
    else:
      return "No"
    
if __name__ == "__main__":
    input_num = input()
    num1 = int(input_num.split()[0])
    num2 = int(input_num.split()[1])
    print(main(num1,num2))

Buggy python submission (verdict: Runtime Error):
def main(test_case,clear_case):
    if test_case <= clear_case:
      return "Yes"
    else:
      return "No"
    
if __name__ == "__main__":
    input_num = input()
    int(num1) = input_num.split()[0]
    int(num2) = input_num.split()[1]
    print(main(num1,num2))

Fixed submission:
def main(test_case,clear_case):
    if test_case <= clear_case:
      return "Yes"
    else:
      return "No"
    
if __name__ == "__main__":
    input_num = input()
    num1 = int(input_num.split()[0])
    num2 = int(input_num.split()[1])
    print(main(num1,num2))
Buggy python submission (verdict: Time Limit Exceeded):
def main(length_num,num_list):
    count_num = 0
    for i in range(0,length_num):
        flag_tag = True
        for j in range(0 , i ):
          if int(num_list[i]) >= int(num_list[j]):
              flag_tag = False
              break
        if flag_tag != False:
            count_num += 1
    return count_num


    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(input_length_num,input_num_list))

Fixed submission:
def main(length_num,num_list):
    count_num = 0
    min_num = int(num_list[0])
    for i in num_list:
        if int(min_num) >= int(i):
            min_num = i
            count_num += 1           
    return count_num
    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(input_length_num,input_num_list))

Buggy python submission (verdict: Runtime Error):
def main(length_num,num_list):
    count_num = 0
    for i in range(0,length_num):
        flag_tag = True
        for j in range(0 , i ):
          if int(num_list[i]) >= int(num_list[j]):
              print(num_list[i],num_list[j])
              flag_tag = False
              break
        if flag_tag != False:
            count_num += 1
    return count_num


    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(length_num,num_list))

Fixed submission:
def main(length_num,num_list):
    count_num = 0
    min_num = int(num_list[0])
    for i in num_list:
        if int(min_num) >= int(i):
            min_num = i
            count_num += 1           
    return count_num
    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(input_length_num,input_num_list))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H = list(map(int, input().split()))
if N <= K:
  print(0)
elif K == 0:
  print(sum(H))
else:
	H = sort(H)
	print(sum(H[:-K]))

Fixed submission:
S = input()
H, A = S.split()
H = int(H)
A = int(A)
if H%A == 0:
  print(int(H/A))
else:
  print(int(H/A) + 1)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H = list(map(int, input().split()))
if N <= K:
  print(0)
elif K == 0:
  print(sum(H))
else:
  H = sort(H)
  print(sum(H[:-K]))

Fixed submission:
N, K = map(int, input().split())
H = list(map(int, input().split()))
if N <= K:
  print(0)
elif K == 0:
  print(sum(H))
else:
  H = sorted(H)
  print(sum(H[:-K]))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H = list(map(int, input().split()))
H = sort(H)
print(sum(H[:-K]))

Fixed submission:
N, K = map(int, input().split())
H = list(map(int, input().split()))
if N <= K:
  print(0)
elif K == 0:
  print(sum(H))
else:
  H = sorted(H)
  print(sum(H[:-K]))
Buggy python submission (verdict: Runtime Error):
import math

h = int(input())
a = int(input())

ans = math.ceil(h/a)

print(ans)

Fixed submission:
import math

h,a = map(int, input().split())
ans = math.ceil(h/a)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
N2 = N
count = 0
i = 1

while True:
  if N == i:
    break
  i *= 2
  count += N2
  N2 //= 2

print(count + 1)

Fixed submission:
# 1000000000000
# 1099511627775
N = int(input())
S = 1

while N >= S:
    S *= 2
 
print(S - 1)
Buggy python submission (verdict: Runtime Error):
import math
H=int(input ())
A=int (input())
print(math.ceil (H/A))


Fixed submission:
import math
H,A=map(int, input().split())
print(math.ceil (H/A))
Buggy python submission (verdict: Runtime Error):
N,K,M=list(map(int,input().split()))
listA=list(map(int,input().split()))
S=sum(listA)
if S>=M*N-K and S<N*M:
  print(M*N-S)
elif S>=M*N:
    print(0)
else:
    print(-1)

Fixed submission:
C=input()
print (chr(ord(C)+1))
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
count=0
for i in range(N):
    if (S[i:i+3]=="ABC"):
        count=count+1
print(count)

Fixed submission:
a, b = map(int, input().split())
if(a * 500 >= b):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if(a * 500 >= b){
  print("Yes")
} else {
  print("No")
}

Fixed submission:
a, b = map(int, input().split())
if(a * 500 >= b):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N=int(input())
S,T=input().split()
A=[]
for s,t in  zip(S,T):
  A.append(s+t)
print(write(A))

Fixed submission:
N=int(input())
S=input()
B=""
for i in range(len(S)):
   C=ord(S[i])+N
   if C>90:
       C=C-26
   else:
       C=C
   B=B+chr(C) 
print(B)
Buggy python submission (verdict: Runtime Error):
N=int(input())
for i in range(9):
  if (N%i)==0 and N/i<10:
    print('Yes')
  else:
    print('No')

Fixed submission:
N=int(input())
if N%2==0 and N/2<10:
    print('Yes')
elif N%3==0 and N/3<10:
    print('Yes')
elif N%4==0 and N/4<10:
    print('Yes')
elif N%5==0 and N/5<10:
    print('Yes')
elif N%6==0 and N/6<10:
    print('Yes')
elif N%7==0 and N/7<10:
    print('Yes')
elif N%8==0 and N/8<10:
    print('Yes')
elif N%9==0 and N/9<10:
    print('Yes')
elif N==1:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
=input()
T=input()
count=0
if S[0]==T[0]:
    count=count+1
if S[1]==T[1]:
    count=count+1
if S[2]==T[2]:
    count=count+1
print(count)

Fixed submission:
S=input()
T=input()
count=0
if S[0]==T[0]:
    count=count+1
if S[1]==T[1]:
    count=count+1
if S[2]==T[2]:
    count=count+1
print(count)
Buggy python submission (verdict: Runtime Error):
=int(input())
P=list(map(int,input().split()))
count=0
if P[0]!=1:
    count=count+1
elif P[N-1
       ]!=N:
    count=count+1
for i in range(N-1):
    if P[i]+1!=P[i+1]:
        count=count+1
if count<5:
    print('YES')
else:
    print('NO')

Fixed submission:
N=int(input())
P=list(map(int,input().split()))
count=0
for i in range(N):
    if P[i]!=i+1:
        count=count+1
if count<3:
    print('YES')
else:
    print('NO')