Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs.append(h[i+k] - h[i])
print(min(diffs))


Fixed submission:
day={
    25:'Christmas',
    24:'Christmas Eve',
    23:'Christmas Eve Eve',
    22:'Christmas Eve Eve Eve'
}

a = int(input())
print(day[a])
Buggy python submission (verdict: Runtime Error):
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs.append(h[i+k] - h[i])
print(min(diffs))


Fixed submission:
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs.append(h[i+k-1] - h[i])
print(min(diffs))

Buggy python submission (verdict: Runtime Error):
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs = h[i+k] - h[i]
print(min(diffs))


Fixed submission:
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs.append(h[i+k-1] - h[i])
print(min(diffs))

Buggy python submission (verdict: Time Limit Exceeded):
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
mindiff = 1000000000
for i in range(n-k+1):
    t = h[i:i+k]
    diff = max(t) - min(t)
    if diff < mindiff:
        mindiff = diff
print(mindiff)


Fixed submission:
n,k = input().split(' ')
n = int(n)
k = int(k)
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
diffs = []
for i in range(n-k+1):
    diffs.append(h[i+k-1] - h[i])
print(min(diffs))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(int(a+b/2))


Fixed submission:
(a,b)=input().split()
print(int(int(a)+int(b)/2))
Buggy python submission (verdict: Runtime Error):
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline()

if S == 'AAA' or S == 'BBB':
    print("No")
else
    print("Yes")

Fixed submission:
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline().strip()

if S == "AAA" or S == "BBB":
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline()

if S == 'AAA' or S == 'BBB':
    return False
else
    return True


Fixed submission:
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline().strip()

if S == "AAA" or S == "BBB":
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
import sys

read = sys.stdin.readline
T = read()
a, b, c = map(int, T.split())

if b == 0:
    print(0)
else if b == 8:
    print(8)
else:
    print(a-c)

Fixed submission:
import sys

read = sys.stdin.readline
T = read()
a, b, c = map(int, T.split())

temp = a // (b+c)
answer = temp * b
temp2 = a % (b+c)

if temp2 >= b:
    answer += b
else:
    answer += temp2

print(answer)
Buggy python submission (verdict: Runtime Error):
import sys
import math

read = ys.std.readline
S = read()

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

for i in range(1000+1):
    if A == math.ceil(i * 0.08):
        if B == math.ceil(i * 0.1):
            print(i)
            return
print(-1)

Fixed submission:
import sys
import math

read = sys.stdin.readline
S = read()

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

fin = False
for i in range(1000+1):
    if a == math.floor(i * 0.08):
        if b == math.floor(i * 0.1):
            print(i)
            fin = True
            break
if not fin:
    print(-1)
Buggy python submission (verdict: Runtime Error):
s = intput().split()
a = list(map(int, input().split()))
u = input()

if u == s[0]:
    print(a[0]-1, a[1])
else:
    print(a[0], a[1]-1)

Fixed submission:
s = input().split()
a = list(map(int, input().split()))
u = input()

if u == s[0]:
    print(a[0]-1, a[1])
else:
    print(a[0], a[1]-1)
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

print(max(0, a-k)+' '+max(0, a+b-k))

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

print(str(max(0, a-k))+' '+str(max(0, min(b, a+b-k))))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
	if a[i]-1 == count:
		count += 1
if count == 0:
	print(-1)
else:
	prin
	t(n-count)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
	if a[i]-1 == count:
		count += 1
if count == 0:
	print('-1')
else:
	print(n-count)
Buggy python submission (verdict: Runtime Error):
def main():
	t = map(int, input().split())
	a = map(int, input().split())
	b = map(int, input().split())
	
	d_0_a = a[0]*t[0]
	d_1_a = a[1]*t[1]
	d_0_b = b[0]*t[0]
	d_1_b = b[1]*t[1]
	
	d_ave_a = d_0_a+d_1_a
	d_ave_b = d_0_b+d_1_b
	
	if d_ave_a == d_ave_b:
		return 'infinity'
	
	diff_0 = d_0_a - d_0_b
	diff_1 = d_1_a - d_1_b
	diff_ave = d_ave_a - d_ave_b
	
	if diff_0*diff_1 > 0:
		return 0
		
	diff_diff_0 = diff_ave + diff_0
	diff_diff_1 = diff_ave + diff_1
	
	if diff_0*diff_ave < 0:
		return -diff_diff_0//diff_ave + 1
	else:
		return -diff_diff_1//diff_ave + 1
	
	
if __name__ == '__main__':
	print(main())

Fixed submission:
def main():
    t = list(map(int, input().split()))
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))

    diff_0 = a[0]-b[0]
    diff_1 = a[1]-b[1]

    if diff_0*diff_1 > 0:
        return 0
    
    d_one_iter = diff_0*t[0]+diff_1*t[1]

    if diff_0*d_one_iter > 0:
        return 0
    if diff_0*d_one_iter == 0:
        return 'infinity'
    
    if abs(diff_0*t[0])%abs(d_one_iter) == 0:
        return 2*abs(diff_0*t[0])//abs(d_one_iter)
    else:
        return 2*(abs(diff_0*t[0])//abs(d_one_iter))+1

if __name__ == "__main__":
    print(main())
Buggy python submission (verdict: Runtime Error):
from math import sqrt, ceil

ab = input().split(' ')
a = int(ab[0])
b = int(ab[1])

tmp = b
if a<b:
	tmp = a
	a = b
	b = tmp

while b != 0:
	tmp = b
	b = a%b
	a = tmp

count = 1

if a == 1:
	return count

if a%2 == 0:
    count += 1
    while a%2 == 0:
        a //= 2

if a == 1:
	return count

while i*i <= a:
    if a%i == 0:
        count += 1
        while a%i == 0:
            a //= i
        if a == 1:
            break
    
return count

if __name__ == "__main__":
    print(main())

Fixed submission:
from math import sqrt, ceil

def main():

    ab = input().split(' ')
    a = int(ab[0])
    b = int(ab[1])

    tmp = b
    if a<b:
        tmp = a
        a = b
        b = tmp

    while b != 0:
        tmp = b
        b = a%b
        a = tmp

    count = 1

    if a == 1:
        return count

    if a%2 == 0:
        count += 1
        while a%2 == 0:
            a //= 2
        if a == 1:
            return count
    
    i = 3
    while i*i <= a:
        if a%i == 0:
            count += 1
            while a%i == 0:
                a //= i
            if a == 1:
                return count
        i += 2
        
    return count+1

if __name__ == "__main__":
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
from math import sqrt, ceil

ab = input().split(' ')
a = int(ab[0])
b = int(ab[1])

tmp = b
if a<b:
	tmp = a
	a = b
	b = tmp

while b != 0:
	tmp = b
	b = a%b
	a = tmp

count = 1
if a == 1:
	print(count)
else:
    if a%2 == 0:
        count += 1
        while a%2 == 0:
            a //= 2

    for i in range(3, a+1, 2):
        if a%i == 0:
            count += 1
            while a%i == 0:
                a //= i
            if a == 1:
                break
    print(count)

Fixed submission:
from math import sqrt, ceil

def main():

    ab = input().split(' ')
    a = int(ab[0])
    b = int(ab[1])

    tmp = b
    if a<b:
        tmp = a
        a = b
        b = tmp

    while b != 0:
        tmp = b
        b = a%b
        a = tmp

    count = 1

    if a == 1:
        return count

    if a%2 == 0:
        count += 1
        while a%2 == 0:
            a //= 2
        if a == 1:
            return count
    
    i = 3
    while i*i <= a:
        if a%i == 0:
            count += 1
            while a%i == 0:
                a //= i
            if a == 1:
                return count
        i += 2
        
    return count+1

if __name__ == "__main__":
    print(main())
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

tmp = -1
sum = 0
for i in range(n):
    sum += b[i]
    if a[i] == tmp + 1:
        sum += c[i]
    tmp = a[i]
print(sum)

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

tmp = -1
sum = 0
for i in range(n):
    sum += b[i]
    if a[i] == tmp + 1:
        sum += c[tmp-1]
    tmp = a[i]
print(sum)
Buggy python submission (verdict: Runtime Error):
li = input().split()

N=int(li[0])
A=int(li[1])
B=int(li[2])

def firstcheck():
    sum=A+B
    count=A
    if(A>=N or A+B>=N):
        return A

    while True:
        if(i%2==0):
            sum+=A
            if(sum>=N):
                count+=(A-(sum-N))
                return count
            else:
                count+=A
                continue
        else:
            sum+=B
            if(sum>=N):
                return count


res=firstcheck()
print(res)



Fixed submission:
s=input()

if('A' in s and 'B' in s):
    print("Yes")
else :
    print("No")
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

def main()
  n, b, r = map(int, input().split())

  x = n // (b + r)

  if n % (b + r) > b:
      print(x * b + b)

  else:
      print((x * b) + (n % (b + r)))
      

if __name__ == '__main__':
    main()
    

Fixed submission:
# coding: utf-8

n, b, r = map(int, input().split())

x = n // (b + r)

if n % (b + r) > b:
    print(x * b + b)
   
else:
    print((x * b) + (n % (b + r)))
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
from sympy import isprime
from sympy import nextprime


def main():
    
    input_ = int(input())
    
    if isprime(input_):
        print(input_)
    else:
        print(nextprime(input_))

    return 0
    

if __name__ == '__main__':
    main()


Fixed submission:
# coding: utf-8
import math


def isprime(target):

    dest = int(math.sqrt(target))
    for i in range(2, dest):
        if target % i == 0:
            return False
    return True


def main():

    i = int(input())

    while True:
        if isprime(i):
            print(i)
            break
        else:
            i += 1

    return 0

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import sys


def main(argv=sys.argv):

    char_list = input()

    char_set = set(char_list)

    for char in char_set:

        if char_list.count(char) % 2 != 0:

            print('No')

            return -1

    print('Yes')

    return 0


if __name__ == '__main__':
    sys.exit(main())


Fixed submission:
# coding: utf-8
import sys


def main(argv=sys.argv):

    char_list = input()

    char_set = set(char_list)

    for char_ in char_set:

        if char_list.count(char_) % 2 != 0:

            print('No')

            return 0

    print('Yes')

    return 0


if __name__ == '__main__':
    sys.exit(main())
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import sys
import numpy as np
import itertools


def main(argv=sys.argv):
  
    packs = list(map(int, input().split(' ')))
    packs = sorted(packs)
    if packs[2] - packs[1] - packs[0] == 0:
        print('Yes')
    else:
        print('No')
  
    return 0


if __name__ == '__main__':
    sys.exit(main())


Fixed submission:
# coding: utf-8
import sys


def main(argv=sys.argv):
  
  n = int(input())
  
  candy_count = 0

  if n == 1:
    candy_count = 1
  else:
    candy_count = (1 + n) * n // 2
    
  print(candy_count)
  
  return 0


if __name__ == '__main__':
  sys.exit(main())
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import sys


def main(argv=sys.argv):

  inputs_ = list(input())

    string_ = []

    for input_ in inputs_:

        if input_ == 'B':

            if not string_ == []:
              
                string_.pop(-1)

        else:

            string_.append(input_)

    print(''.join(string_))

    return 0


if __name__ == '__main__':
    sys.exit(main())


Fixed submission:
# coding: utf-8
import sys


def main(argv=sys.argv):
  
    inputs_ = list(input())

    string_ = []

    for input_ in inputs_:

        if input_ == 'B':

            if not string_ == []:
              
                string_.pop(-1)

        else:

            string_.append(input_)

    print(''.join(string_))

    return 0


if __name__ == '__main__':
    sys.exit(main())
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())

if (A==B==C or  A!=C and B !=C):
  print("No")

else:
  print("Yes")


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

if (A==B==C or  A!=C and A!=B and B!=C):
  print("No")

else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
A = input ()
B = input ()
C = input ()

if (A==B and A!=C or B==C and B!=A or A==C and A!=B ):
  print("Yes")
  
else:
  print("No")

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

if (A==B==C or  A!=C and A!=B and B!=C):
  print("No")

else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
N = int(input())
K = list(str(input()))
count=0


for i in range(N):  
  if K[i] == "A":
    if K[i+1] == "B":
      if K[i+2] == "C":
        count += 1

print(count)

Fixed submission:
N = int(input())
K = list(str(input()))
count=0


for i in range(N):  
  if K[i-2] == "A":
    if K[i-1] == "B":
      if K[i] == "C":
        count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = list(str(input()))
count=0


for i in range(N):
  if K[i-1] == "A":
    if K[i] == "B":
      if K[i+1] == "C":
        count += 1

print(count)

Fixed submission:
N = int(input())
K = list(str(input()))
count=0


for i in range(N):  
  if K[i-2] == "A":
    if K[i-1] == "B":
      if K[i] == "C":
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
S = str(input())

s_up = list(S)
s_low = s_up[K-1].lower()
s_up [K-1] = s_low

for n in range(N):
    print(s_up[n], end='')

print()


Fixed submission:
l = input().split()
N = int(l[0])
K = int(l[1])
S = str(input())

s_up = list(S)
s_up [K-1] = s_up[K-1].lower()

for n in range(N):
    print(s_up[n], end='')

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

if A == 0 :
    print(0)

elif N >A+B :
    q, mod = divmod(N, A+B)
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    q, mod = divmod(N, A+B)
    print(q*A)

elif N < A+B :
    print(N)

Fixed submission:
S = input()
if S == 'AAA' or S == 'BBB' :
    print('No')
else :
    print('Yes')

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

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A+B :
    print(N)

Fixed submission:
S = input()
if S == 'AAA' or S == 'BBB' :
    print('No')
else :
    print('Yes')

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

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A or N < A+B :
    print(N)

Fixed submission:
S = input()
if S == 'AAA' or S == 'BBB' :
    print('No')
else :
    print('Yes')

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

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A or N < A+B :
    print(N)

Fixed submission:
S = input()
if S == 'AAA' or S == 'BBB' :
    print('No')
else :
    print('Yes')

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

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A+B :
    print(N)
    
elif N < A :
    print(N)

Fixed submission:
S = input()
if S == 'AAA' or S == 'BBB' :
    print('No')
else :
    print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
A,B,K = map(int,input().split())

if K >= A+B:
    print(str(0)+' '+str(0))

else:
    for i in range(K):
        if A > 0:
            A -= 1
        elif B > 0:
            B -= 1
    print(str(A)+' '+str(B))

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

if K >= A+B:
    print(str(0)+' '+str(0))

elif K < A:
    print(str(A-K)+' '+str(B))

elif K >= A:
    print(str(0)+' '+str(B-(K-A)))

Buggy python submission (verdict: Time Limit Exceeded):
A,B,K = map(int,input().split())

for i in range(K):
    if A > 0:
        A -= 1
    elif B > 0:
        B -= 1
print(str(A)+' '+str(B))

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

if K >= A+B:
    print(str(0)+' '+str(0))

elif K < A:
    print(str(A-K)+' '+str(B))

elif K >= A:
    print(str(0)+' '+str(B-(K-A)))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P_list = list(map(int, input().split()))
cnt = 0
for i, P in enumerate(P_list):
    for tmp_P in P_list[:i+1]:
        if P > tmp_P:
            break
    else:
        cnt += 1
print(cnt)

Fixed submission:
N = int(input())
P_list = list(map(int, input().split()))
cnt = 0
min_num = P_list[0]
for P in P_list:
    if min_num >= P:
        cnt += 1
        min_num = P
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import product
X = int(input())

tuple_list = []
S = [0, 1, 2, 3, 4, 5]
A = X // 100
B = X - (A * 100)
if A > B:
    print(1)
else:
    for s in product(S, repeat=A):
        if sum(s) == B:
            print(1)
            exit()
    else:
        print(0)

Fixed submission:
from itertools import combinations_with_replacement
X = int(input())

S = [0, 1, 2, 3, 4, 5]
A = X // 100
B = X - (A * 100)
if A > B:
    print(1)
else:
    A_list = list(combinations_with_replacement(S, A))
    for i in A_list:
        if sum(i) == B:
            print(1)
            exit()
    else:
        print(0)
Buggy python submission (verdict: Runtime Error):
S = input()
week_list = ["SUN", "MON", "TUE", "WED", "THE", "FRI", "SAT"]
print(7 - week_list.index(S))

Fixed submission:
S = input()
week_list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7 - week_list.index(S))
Buggy python submission (verdict: Runtime Error):
P, Q, R = int(input()), int(input()), int(input())

if P < Q < R:
    t1 = P
    t2 = Q
elif P < R < Q:
    t1 = P
    t2 = R
else:
    t1 = Q
    t2 = R

print(t1+t2)

Fixed submission:
P, Q, R = map(int, input().split())

times = []
times.append(P+Q)
times.append(P+R)
times.append(Q+R)

print(min(times))

Buggy python submission (verdict: Runtime Error):
P = int(input())
Q = int(input())
R = int(input())

if P < Q < R:
    t1 = P
    t2 = Q
elif P < R < Q:
    t1 = P
    t2 = R
else:
    t1 = Q
    t2 = R

print(t1+t2)

Fixed submission:
P, Q, R = map(int, input().split())

times = []
times.append(P+Q)
times.append(P+R)
times.append(Q+R)

print(min(times))

Buggy python submission (verdict: Runtime Error):
P = int(input())
Q = int(input())
R = int(input())

if P < Q < R:
	t1 = P
    t2 = Q
elif P < R < Q:
    t1 = P
    t2 = R
else:
    t1 = Q
    t2 = R

print(t1+t2)

Fixed submission:
P, Q, R = map(int, input().split())

times = []
times.append(P+Q)
times.append(P+R)
times.append(Q+R)

print(min(times))

Buggy python submission (verdict: Runtime Error):
P = int(input())
Q = int(input())
R = int(input())

if P < Q < R:
	t1 = P
    t2 = Q
elif P < R < Q:
    t1 = P
    t2 = R
else:
    t1 = Q
    t2 = R

print(t1+t2)

Fixed submission:
P, Q, R = map(int, input().split())

times = []
times.append(P+Q)
times.append(P+R)
times.append(Q+R)

print(min(times))
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = input()

print(s[:k] + s[k].lower() + s[k+1:])

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, t = map(int, input().split())

a = []

for i in range(n):
  cost, time = map(int, input().split())
  if time <= t:
    a.append(cost)

if len(a) is 0:
  print("TLE")
else:
  a.sort()
  print(a[0])


Fixed submission:
n = input()

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

a = []

for i in range(n):
  cost, time = map(int, input().split())
  if time <= t:
    a.append(cost)

a.sort()
print(a[0])

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

a = []

for i in range(n):
  cost, time = map(int, input().split())
  if time <= t:
    a.append(cost)

if len(a) is 0:
  print("TLE")
else:
  a.sort()
  print(a[0])
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
N = int(n)
a = input().split()
A = list(map(int, a))

c = 0
for i in range(N):
    for j in range(i + 1, N):
        if A[i] == A[j]:
            print("NO")
            c += 1
            break
if c == 0:
    print("YES")

Fixed submission:
n = input()
N = int(n)
a = input().split()
A = list(map(int, a))

b = set(A)
B = list(map(int, b))

if len(A) == len(B):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):

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

tmp = 0
num = []
ans = []
for i in range(N):
    tmp += (P[i] * (P[i] + 1) / 2 / P[i])
    ans.append(tmp)
    tmp -= tmp
    if i >= (K-1):
        num.append(sum(ans[i - K + 1:i + 1]))
print(max(num))

Fixed submission:
n, k = input().split()
N = int(n)
K = int(k)
p = input().split()
P = list(map(int, p))
 
tmp = 0
num = 0
hoge = 0
ans = []
for i in range(N):
    tmp += (P[i] * (P[i] + 1) / 2 / P[i])
    ans.append(tmp)
    tmp -= tmp
    if i == (K-1):
        num = sum(ans[0:K])
        hoge = num
    elif i > (K-1):
        num = num - ans[i-K] + ans[i]
        if num > hoge:
            hoge = num
print(hoge)

Buggy python submission (verdict: Time Limit Exceeded):

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

tmp = 0
ans = []
for i in range(K, N + 1, 1):
    for j in range(i - K, i, 1):
        tmp += (P[j] * (P[j] + 1) / 2 / P[j])
    ans.append(tmp)
    tmp -= tmp

print(max(ans))

Fixed submission:
n, k = input().split()
N = int(n)
K = int(k)
p = input().split()
P = list(map(int, p))
 
tmp = 0
num = 0
hoge = 0
ans = []
for i in range(N):
    tmp += (P[i] * (P[i] + 1) / 2 / P[i])
    ans.append(tmp)
    tmp -= tmp
    if i == (K-1):
        num = sum(ans[0:K])
        hoge = num
    elif i > (K-1):
        num = num - ans[i-K] + ans[i]
        if num > hoge:
            hoge = num
print(hoge)
Buggy python submission (verdict: Runtime Error):
if len(set(S)) != 2:
  print("NO")
else:
  print("YES")

Fixed submission:
S = input()
if len(set(S)) != 2:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
if S[0] == S[1] and S[1] == S[2]:
  print("NO")
else:
  print("YES")

Fixed submission:
S = input()
if len(set(S)) != 2:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):

if S == "AAA" or S == "BBB":
    print("NO")
else:
    print("YES")

Fixed submission:
S = input()
if len(set(S)) != 2:
  print("No")
else:
  print("Yes")