Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def solve():
    N = int(input())
    S = input()
    cnt = {}
    for c in S:
        cnt[c] = cnt.get(c, 0) + 1
    total_triplets = cnt['R'] * cnt['G'] * cnt['B']
    for stride in range(1, N):
        for i in range(0, N-2*stride):
            j = i + stride
            k = j + stride
            if S[i] != S[j] and S[j] != S[k] and S[k] != S[i]:
                total_triplets -= 1
    print(total_triplets)

if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    N = int(input())
    S = input()
    cnt = {}
    for c in S:
        cnt[c] = cnt.get(c, 0) + 1
    total_triplets = cnt.get('R', 0) * cnt.get('G', 0) * cnt.get('B', 0)
    for stride in range(1, N):
        for i in range(0, N-2*stride):
            j = i + stride
            k = j + stride
            if S[i] != S[j] and S[j] != S[k] and S[k] != S[i]:
                total_triplets -= 1
    print(total_triplets)

if __name__ == "__main__":
    solve()
Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    S = input()
    s = [c for c in S]
    Q = int(input())
    for i in range(Q):
        T = input().split()
        if T[0] == '1':
            for j in range(len(s)//2):
                tmp = s[j]
                s[j] = s[-1-j]
                s[-1-j] = tmp
        else:
            ext = [c for c in T[2]]
            if T[1] == '1':
                s = ext + s
            else:
                s = s + ext
    print(''.join(s))

if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    from collections import deque
    S = input()
    s = deque(S)
    Q = int(input())
    reverse = False
    for i in range(Q):
        T = input().split()
        if T[0] == '1':
            if reverse:
                reverse = False
            else:
                reverse = True
        else:
            if T[1] == '1' and not reverse:
                s.appendleft(T[2])
            elif T[1] == '1' and reverse:
                s.append(T[2])
            elif T[1] == '2' and not reverse:
                s.append(T[2])
            else:
                s.appendleft(T[2])
    if reverse:
        print(''.join(s)[::-1])
    else:
        print(''.join(s))

if __name__ == "__main__":
    solve()

Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    S = input()
    Q = int(input())
    for i in range(Q):
        T = input().split()
        if T[0] == '1':
            S = S[::-1]
        else:
            if T[1] == '1':
                S = T[2] + S
            else:
                S = S + T[2]
    print(S)

if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    from collections import deque
    S = input()
    s = deque(S)
    Q = int(input())
    reverse = False
    for i in range(Q):
        T = input().split()
        if T[0] == '1':
            if reverse:
                reverse = False
            else:
                reverse = True
        else:
            if T[1] == '1' and not reverse:
                s.appendleft(T[2])
            elif T[1] == '1' and reverse:
                s.append(T[2])
            elif T[1] == '2' and not reverse:
                s.append(T[2])
            else:
                s.appendleft(T[2])
    if reverse:
        print(''.join(s)[::-1])
    else:
        print(''.join(s))

if __name__ == "__main__":
    solve()
Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    N,K = [int(i) for i in input().split()]
    P = [int(i) for i in input().split()]
    ans = 0
    for i in range(N-K+1):
        expected_sum = 0
        for j in range(i, i+K):
            expected_sum += (P[j]+1) / 2.0
        ans = max(expected_sum, ans)
    print(ans)

if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    N,K = [int(i) for i in input().split()]
    P = [int(i) for i in input().split()]
    prev_K_sum = max_K_sum = sum(P[:K])
    start = 0
    for i in range(N-K):
        cur_K_sum = prev_K_sum - P[i] + P[i+K]
        if cur_K_sum > max_K_sum:
            start = i + 1
            max_K_sum = cur_K_sum
        prev_K_sum = cur_K_sum
    target = P[start:start+K]
    ans = sum([(num+1)/2.0 for num in target])
    print(ans)

if __name__ == "__main__":
    solve()

Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    N,K = [int(i) for i in input().split()]
    P = [int(i) for i in input().split()]
    ans = 0
    for i in range(N-K+1):
        target = P[i:i+K]
        expected_sum = sum([(num+1)/2.0 for num in target])
        ans = max(expected_sum, ans)
    print(ans)

if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    N,K = [int(i) for i in input().split()]
    P = [int(i) for i in input().split()]
    prev_K_sum = max_K_sum = sum(P[:K])
    start = 0
    for i in range(N-K):
        cur_K_sum = prev_K_sum - P[i] + P[i+K]
        if cur_K_sum > max_K_sum:
            start = i + 1
            max_K_sum = cur_K_sum
        prev_K_sum = cur_K_sum
    target = P[start:start+K]
    ans = sum([(num+1)/2.0 for num in target])
    print(ans)

if __name__ == "__main__":
    solve()
Buggy python submission (verdict: Runtime Error):
def solve():
    import math
    N,M = [int(i) for i in input().split()]
    A = list(map(int, input().split()))

    lcm = A[0]
    for i in range(1, N):
        lcm = lcm * A[i] // math.gcd(lcm, A[i])
    if lcm == 0:
        print('0')
        return
    first = lcm * 0.5

    ans_exists = True
    for i in range(N):
        if first % A[i] == 0:
            ans_exists = False

    if ans_exists:
        ans = int((M-first) // lcm + 1)
        print(ans)
    else:
        print('0')

if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    import math
    N,M = [int(i) for i in input().split()]
    A = list(map(int, input().split()))

    lcm = A[0]
    for i in range(1, N):
        lcm = lcm * A[i] // math.gcd(lcm, A[i])
    first = lcm // 2

    ans_exists = True
    for i in range(N):
        if first % A[i] == 0:
            ans_exists = False

    if ans_exists:
        ans = int((M-first) // lcm + 1)
        print(ans)
    else:
        print('0')

if __name__ == "__main__":
    solve()

Buggy python submission (verdict: Runtime Error):
def solve():
    import math
    N,M = [int(i) for i in input().split()]
    A = list(map(int, input().split()))

    lcm = A[0]
    for i in range(1, N):
        lcm = lcm * A[i] // math.gcd(lcm, A[i])
    first = lcm * 0.5

    ans_exists = True
    for i in range(N):
        if first % A[i] == 0:
            ans_exists = False

    if ans_exists:
        ans = int((M-first) // lcm + 1)
        print(ans)
    else:
        print('0')

if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    import math
    N,M = [int(i) for i in input().split()]
    A = list(map(int, input().split()))

    lcm = A[0]
    for i in range(1, N):
        lcm = lcm * A[i] // math.gcd(lcm, A[i])
    first = lcm // 2

    ans_exists = True
    for i in range(N):
        if first % A[i] == 0:
            ans_exists = False

    if ans_exists:
        ans = int((M-first) // lcm + 1)
        print(ans)
    else:
        print('0')

if __name__ == "__main__":
    solve()

Buggy python submission (verdict: Runtime Error):
def solve():
    import math
    N,M = [int(i) for i in input().split()]
    A = list(map(int, input().split()))
    lcm = A[0]
    for i in range(1, N):
        lcm = lcm * A[i] // math.gcd(lcm, A[i])
    first = lcm * 0.5
    ans = int((M-first)//lcm + 1)
    print(ans)

if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    import math
    N,M = [int(i) for i in input().split()]
    A = list(map(int, input().split()))

    lcm = A[0]
    for i in range(1, N):
        lcm = lcm * A[i] // math.gcd(lcm, A[i])
    first = lcm // 2

    ans_exists = True
    for i in range(N):
        if first % A[i] == 0:
            ans_exists = False

    if ans_exists:
        ans = int((M-first) // lcm + 1)
        print(ans)
    else:
        print('0')

if __name__ == "__main__":
    solve()
Buggy python submission (verdict: Time Limit Exceeded):
x,k,d = map(int,input().split())
an = x

if x < 0:
    x = -x

if x-d*k >= 0:
    an = x-d*k
else:
    for i in range(k):
        if x > 0:
            x -= d
        else:
            x += d
            
        if an > abs(x) or i==0:
            an = x
        else:
            if (k-i-1)%2 == 0:
                an = x
            break
        
print(abs(an))

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

if x < 0:
    x = -x

if k <= x/d:
    an = x-d*k
else:
    if (k-x//d)%2==0:
        an = x-d*(x//d)
    else:
        an = x-d*(x//d)-d
        
print(abs(an))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
number =1

for i in a:
    if i==0:
        print(0)
        exit()
    number *= i
    if number > 10**18:
            print(-1)
            exit()

print(number)

Fixed submission:
A,B =(int(x) for x in input().split())
print(A*B)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = (int(x) for x in input().split())
number =1

for i in a:
    if i==0:
        print(0)
        exit(0)
    number *= i
    if number>10**18:
            print(-1)
            exit(0)

print(number)

Fixed submission:
A,B =(int(x) for x in input().split())
print(A*B)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = (int(x) for x in input().split())
number =1

for i in a:
    if number==0:
        print(0)
        exit(0)
    number *= i
    

if number>10**18:
    print(-1)
    exit(0)

print(number)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
number =1

if 0 in a:
    print(0)
    exit()

for i in a:
    number *= i
    if number > 10**18:
            print(-1)
            exit()

print(number)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = (int(x) for x in input().split())
number =1

for i in a:
    if number==0:
        print(0)
        exit()
    number *= i
    

if number>10**18:
    print(-1)
    exit()

print(number)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
number =1

if 0 in a:
    print(0)
    exit()

for i in a:
    number *= i
    if number > 10**18:
            print(-1)
            exit()

print(number)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = (int(x) for x in input().split())
number =1

for i in a:
    if number==0:
        exit()
    number *= i
    

if number>10**18:
    number = -1

print(number)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
number =1

if 0 in a:
    print(0)
    exit()

for i in a:
    number *= i
    if number > 10**18:
            print(-1)
            exit()

print(number)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = (int(x) for x in input().split())
number =1

for i in a:
    number *= i

if number>10**18:
    number = -1

print(number)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
number =1

if 0 in a:
    print(0)
    exit()

for i in a:
    number *= i
    if number > 10**18:
            print(-1)
            exit()

print(number)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = input()
number =1
for i in a.split():
    number *= int(i)


if number>10**18:
    number = -1

print(number)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
number =1

if 0 in a:
    print(0)
    exit()

for i in a:
    number *= i
    if number > 10**18:
            print(-1)
            exit()

print(number)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = input().split()
number = 1
for i in a[:N]:
    number *= int(i)


if number>10**18:
    number = -1

print(number)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
number =1

if 0 in a:
    print(0)
    exit()

for i in a:
    number *= i
    if number > 10**18:
            print(-1)
            exit()

print(number)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = input().split()
number = 1
for i in a[:N]:
    number *= int(i)


if number>1000000000000000000:
    number = -1

print(number)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
number =1

if 0 in a:
    print(0)
    exit()

for i in a:
    number *= i
    if number > 10**18:
            print(-1)
            exit()

print(number)
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
a = 7
count = 1
for i in range(K):
    if a % K == 0:
        break
    a = (a * 10) + 7
    count += 1
if count == K + 1:
    print(-1)
else:
    print(count)

Fixed submission:
K = int(input())
a = 7
count = 1
for i in range(K):
    if a % K == 0:
        break
    a = (a * 10 + 7) % K
    count += 1
if count == K + 1:
    print(-1)
else:
    print(count)

Buggy python submission (verdict: Runtime Error):
K = int(input())
if K % 2 == 0:
    print(-1)
else:
    a = 7
    count = 1
    while True:
        if a % K == 0:
            break
        a = (a * 10) + 7
        count += 1
print(count)

Fixed submission:
K = int(input())
a = 7
count = 1
for i in range(K):
    if a % K == 0:
        break
    a = (a * 10 + 7) % K
    count += 1
if count == K + 1:
    print(-1)
else:
    print(count)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np


n,m = list(map(int,input().split()))

a = list(map(int,input().split()))

nparr = np.array(a)

tmp = 0
data = 0

for i in range(m):

        tmp = np.argmax(a)

        data = np.floor(a[tmp]/2)

        a = np.delete(a, tmp)

        a = np.append(a, data)


print(int(np.sum(a)))

Fixed submission:
import heapq
import math

n,m = list(map(int,input().split()))
a = list(map(lambda x: int(x) * (-1), input().split()))

heapq.heapify(a)

for i in range(m):
	tmp = heapq.heappop(a)
	tmp = (math.floor(-tmp/2)) * (-1)
	heapq.heappush(a, tmp)

print(sum(a) * -1)

Buggy python submission (verdict: Time Limit Exceeded):
import math
import heapq
 
n,m = list(map(int,input().split()))
 
a = list(map(int,input().split()))
 
tmp = 0
 
for i in range(m):
 
        tmp = heapq.nlargest(1,a)
        a.remove(tmp[0])
        a.append(math.floor(tmp[0]/2))
 
 
print(sum(a))

Fixed submission:
import heapq
import math

n,m = list(map(int,input().split()))
a = list(map(lambda x: int(x) * (-1), input().split()))

heapq.heapify(a)

for i in range(m):
	tmp = heapq.heappop(a)
	tmp = (math.floor(-tmp/2)) * (-1)
	heapq.heappush(a, tmp)

print(sum(a) * -1)

Buggy python submission (verdict: Time Limit Exceeded):
import math
import heapq

n,m = list(map(int,input().split()))

a = list(map(int,input().split()))

tmp = 0

for i in range(m):
        a.sort(reverse=True)

        tmp = heapq.nlargest(1,a)
        a.remove(tmp[0])
        a.append(math.floor(tmp[0]/2))


print(sum(a))

Fixed submission:
import heapq
import math

n,m = list(map(int,input().split()))
a = list(map(lambda x: int(x) * (-1), input().split()))

heapq.heapify(a)

for i in range(m):
	tmp = heapq.heappop(a)
	tmp = (math.floor(-tmp/2)) * (-1)
	heapq.heappush(a, tmp)

print(sum(a) * -1)

Buggy python submission (verdict: Time Limit Exceeded):
import math

n,m = list(map(int,input().split()))

a = list(map(int,input().split()))


for i in range(m):
        a.sort(reverse=True)
        a[0] = math.floor(a[0]/2)

print(sum(a))

Fixed submission:
import heapq
import math

n,m = list(map(int,input().split()))
a = list(map(lambda x: int(x) * (-1), input().split()))

heapq.heapify(a)

for i in range(m):
	tmp = heapq.heappop(a)
	tmp = (math.floor(-tmp/2)) * (-1)
	heapq.heappush(a, tmp)

print(sum(a) * -1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))

ans = 0
tmp = 0
for i in range(n):

    if h[i] >= h[i + 1]:
        tmp += 1
    elif ans < tmp:
        ans = tmp
        tmp = 0
    
else:
    if ans < tmp:
        ans = tmp

print(ans)


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

ans = 0
tmp = 0
for i in range(n - 1):

    if h[i] >= h[i + 1]:
        tmp += 1
    else:
        if ans < tmp:
            ans = tmp
        tmp = 0
    
else:
    if ans < tmp:
        ans = tmp

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

ans = 0
for i in range(n):
    ans += i

print(ans)


Fixed submission:
n = int(input())

ans = n * (n-1) // 2

print(ans)
Buggy python submission (verdict: Runtime Error):
N,Q = map(int,input().split())
S = input()
array = [[0 for _ in range(Q)] for _ in range(Q)]
for i in range(Q):
	array[i][0], array[i][1] = map(int,input().split())
for i in range(Q):
	print(S[array[i][0]-1:array[i][1]].count("AC"))

Fixed submission:
import sys
from itertools import accumulate

def main():
    input = sys.stdin.readline
    N, Q = map(int, input().split())
    S = [str(c) for c in input().strip()]

    dp = [0] * N
    for i in range(1, N):
        s = S[i-1] + S[i]
        if s == 'AC':
            dp[i] += 1
    
    DP = list(accumulate(dp))

    for _ in range(Q):
        l, r = map(int, input().split())
        print(DP[r-1] - DP[l-1])


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()

posDevide = 1
maxMatchWordNum = 0

while posDevide <=  N - 1:
        arrayNum = 0
        matchWordNum = 0
        while arrayNum < posDevide:
                if arrayNum  == S.find( S[ arrayNum ], 0, posDevide):
                        matchWordNum = matchWordNum + 1 if  bool( S.count( S[ arrayNum ], posDevide, N )) else matchWordNum

                arrayNum += 1

        maxMatchWordNum = matchWordNum if matchWordNum > maxMatchWordNum else maxMatchWordNum
        posDevide += 1

print(maxMatchWordNum)

Fixed submission:
a, b = (int(i) for i in input().split())
max_ab = max(a+b,a-b,a*b)
print(max_ab)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()

posDevide = 1
maxMatchWordNum = 0

while posDevide < N:
        arrayNum = 1
        matchWordNum = 0
        while arrayNum <=  posDevide:
                if arrayNum == S.find( S[ arrayNum - 1 ]:
                        matchWordNum = matchWordNum + 1 if  bool( S.count( S[ arrayNum - 1 ], posDevide, N-1 )) else matchWordNum
                arrayNum += 1

        maxMatchWordNum = matchWordNum if matchWordNum > maxMatchWordNum else maxMatchWordNum
        posDevide += 1

print(maxMatchWordNum)

Fixed submission:
N = int(input())
S = input()

posDevide = 1
maxMatchWordNum = 0

while posDevide <=  N - 1:
        arrayNum = 0
        matchWordNum = 0
        while arrayNum < posDevide:
                if arrayNum  == S.find( S[ arrayNum ], 0, posDevide):
                        matchWordNum = matchWordNum + 1 if  bool( S.count( S[ arrayNum ], posDevide, N )) else matchWordNum

                arrayNum += 1

        maxMatchWordNum = matchWordNum if matchWordNum > maxMatchWordNum else maxMatchWordNum
        posDevide += 1

print(maxMatchWordNum)

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

posDevide = 1
maxMatchWordNum = 0

while posDevide < N:
        arrayNum = 1
        mutchWordNum = 0
        while arrayNum <=  posDevide:
                matchWordNum = matchWordNum + 1 if  bool( s.count[ arrayNum - 1 ], posDevide, N-1 ) else matchWordNum
                arrayNum + 1
        end
        maxMatchWordNum = matchWordNum if matchWordNum > maxMatchWordNum else maxMatchWordNum
        posDevide + 1
end

print(maxMatchWordNum)

Fixed submission:
N = int(input())
S = input()

posDevide = 1
maxMatchWordNum = 0

while posDevide <=  N - 1:
        arrayNum = 0
        matchWordNum = 0
        while arrayNum < posDevide:
                if arrayNum  == S.find( S[ arrayNum ], 0, posDevide):
                        matchWordNum = matchWordNum + 1 if  bool( S.count( S[ arrayNum ], posDevide, N )) else matchWordNum

                arrayNum += 1

        maxMatchWordNum = matchWordNum if matchWordNum > maxMatchWordNum else maxMatchWordNum
        posDevide += 1

print(maxMatchWordNum)
Buggy python submission (verdict: Runtime Error):
s,K = input(),int(input())

subList = []
N = len(s)
repNum = 0

while N - repNum >= 1:
        for i in range(repNum+1):
                subList.append(s[i:N-repNum+i])
        repNum += 1
subListUniq = list(set(subList))
subListUniq.sort()
print(subListUniq[K-1])

Fixed submission:
s = input()
K = int(input())

substr = set()
for i in range(len(s)):
    for j in range(i+1, i+K+1):
        substr.add(s[i:j])

print(sorted(substr)[K-1])
Buggy python submission (verdict: Runtime Error):
N,X = map(int, input().split())
okamotos = [int(input()) for i in range(N)]
print(N + map(int,(X - sum(okamotos))/min(okamotos)))

Fixed submission:
N,X = map(int, input().split())
okamotos = [int(input()) for i in range(N)]
print(N + int((X - sum(okamotos))/min(okamotos)))
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=int(input())
print([No,Yes][n-n//a＊500-a<0])


Fixed submission:
n=int(input())
a=int(input())
print(['No','Yes'][n-(n//500)/(1/500)-a<=0])
Buggy python submission (verdict: Runtime Error):
N=int( input())
a=list(set([int(j) for j in range(N)]))
print(a[::2]-a[1::2])

Fixed submission:
N=input()
a= sorted([int(j) for j in input().split()],reverse=True)
print(sum(a[::2])-sum(a[1::2]))
Buggy python submission (verdict: Runtime Error):
S = input()
if S = 'SSS':
  print('0')
elif S = 'RRR':
  print('3')
elif S = 'RRS' or S = 'SRR':
  print('2')
else :
  print('1')
  

Fixed submission:
S = input()
if S =='SSS':
  print('0')
elif S == 'RRR':
  print('3')
elif S == 'RRS' or S == 'SRR':
  print('2')
else :
  print('1')
Buggy python submission (verdict: Runtime Error):
x = int(input())
s =  x * 360 / math.gcd(x, 360)
print(s/x)

Fixed submission:
import math
x = int(input())
s =  x * 360 / math.gcd(x, 360)
print(int(s//x))

Buggy python submission (verdict: Runtime Error):
x = int(input())
s = x * 360/ gcd(x,360)
print(s/x)

Fixed submission:
import math
x = int(input())
s =  x * 360 / math.gcd(x, 360)
print(int(s//x))
Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] == 0:
    print(i+!)
    break

Fixed submission:
x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] == 0:
    print(i+1)
    break

Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] = 0:
    print(i)
    break

Fixed submission:
x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] == 0:
    print(i+1)
    break

Buggy python submission (verdict: Runtime Error):
x = list(input())
for i in range(len(x)):
  if x[i] = 0:
    print(x[i])
    break

Fixed submission:
x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] == 0:
    print(i+1)
    break
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
if len(s)+1 = len(t):
  print('Yes')
else:
  print('No')

Fixed submission:
s = input()
t = input()
t2 = t[:-1]
if t2 == s:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
  k = int(input())
  a, b = map(int,input().split())
  for i in range(a, b):
    if i%k ==0:
      print('OK')
      return
    print('NG')
  return
 

Fixed submission:
def main():
  k = int(input())
  a, b = map(int,input().split())
  for i in range(a, b+1):
    if i%k ==0:
      print('OK')
      return
  print('NG')
  return
 
main()

Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = int(input())
if k <= b-a+1:
  print('Yes')
else:
  print('No')

Fixed submission:
def main():
  k = int(input())
  a, b = map(int,input().split())
  for i in range(a, b+1):
    if i%k ==0:
      print('OK')
      return
  print('NG')
  return
 
main()