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

Fixed submission:
N, X, M = map(int, input().split())
if X == 0:
    print(0)
    exit()
tx = X % M
tl = []
ts = set()
ttl = []
for i in range(N):
    tl.append(tx)
    ts.add(tx)
    tx = pow(tx, 2, M)
    if tx in ts:
        ttl = tl[tl.index(tx):]
        break
ans = sum(tl)
if len(ttl)>0:
    d, m = divmod(N-len(tl), len(ttl))
    ans += sum(ttl)*d+sum(ttl[:m])
print(ans)

Buggy submission (verdict: Runtime Error):
N, X, M = map(int, input().split())
if X == 0:
    print(0)
    exit()
tx = X % M
tl = []
ts = set()
ttl = []
for i in range(N):
    tl.append(tx)
    ts.add(tx)
    tx = pow(tx, 2, M)
    if tx in ts:
        ttl = tl[tl.index(tx):]
        break
ans = sum(tl)
d, m = divmod(N-len(tl), len(ttl))
ans += sum(ttl)*d+sum(ttl[:m])
print(ans)

Buggy submission (verdict: Runtime Error):
N, X, M = map(int, input().split())
if X == 0:
    print(0)
tx = X % M
tl = []
ts = set()
ttl = []
for i in range(N):
    tl.append(tx)
    ts.add(tx)
    tx = pow(tx, 2, M)
    if tx in ts:
        ttl = tl[tl.index(tx):]
        break
ans = sum(tl)
d, m = divmod(N-len(tl), len(ttl))
ans += sum(ttl)*d+sum(ttl[:m])
print(ans)

Buggy submission (verdict: Runtime Error):
N, X, M = map(int, input().split())
tx = X % M
tl = []
ts = set()
ttl = []
for i in range(N):
    tl.append(tx)
    ts.add(tx)
    tx = pow(tx, 2, M)
    if tx in ts:
        ttl = tl[tl.index(tx):]
        break
ans = sum(tl)
d, m = divmod(N-len(tl), len(ttl))
ans += sum(ttl)*d+sum(ttl[:m])
print(ans)

Buggy submission (verdict: Runtime Error):
N, X, M = map(int, input().split())
tx = X % M
tl = []
ttl = []
for i in range(N):
    tl.append(tx)
    tx = pow(tx, 2, M)
    if tx in tl:
        ttl = tl[tl.index(tx):]
        break
ans = sum(tl)
d, m = divmod(N-len(tl), len(ttl))
ans += sum(ttl)*d+sum(ttl[:m])
print(ans)
Problem p02598 (python)

Fixed submission:
N,K=map(int,input().split())
A=list(map(int,input().split()))
low=0
high=max(A)
while high-low>1:
    mid=(low+high)//2
    cnt=0
    for i in A:
        cnt+=(i-1)//mid
    if cnt>K:
        low=mid
    else:
        high=mid
print(high)

Buggy submission (verdict: Runtime Error):
import heapq
import math
N,K=map(int,input().split())
A=list(map(int,input().split()))
hq=[]
for i in A:
    heapq.heappush(hq,-i)
while K>0:
    t1=heapq.heappop(hq)
    t2=heapq.heappop(hq)
    if t1==t2 or K<3:
        heapq.heappush(hq,t1/2)
        heapq.heappush(hq,t1/2)
        heapq.heappush(hq,t2)
        K-=1
    else:
        heapq.heappush(hq,t1/3)
        heapq.heappush(hq,t1/3)
        heapq.heappush(hq,t1/3)
        heapq.heappush(hq,t2)
        K-=2
print(math.ceil(-heapq.heappop(hq)))

Buggy submission (verdict: Runtime Error):
import heapq
N,K=map(int,input().split())
A=list(map(int,input().split()))
hq=[]
for i in A:
    heapq.heappush(hq,-i)
while K>0:
    t1=heapq.heappop(hq)
    t2=heapq.heappop(hq)
    if t1==t2 or K<3:
        heapq.heappush(hq,t1/2)
        heapq.heappush(hq,t1/2)
        heapq.heappush(hq,t2)
        K-=1
    else:
        heapq.heappush(hq,t1/3)
        heapq.heappush(hq,t1/3)
        heapq.heappush(hq,t1/3)
        heapq.heappush(hq,t2)
        K-=2
print(int(-(heapq.heappop(hq)//1)))
Problem p02726 (python)

Fixed submission:
n,x,y=map(int,input().split())
ans=[0]*n
for i in range(1,n):
    for j in range(i+1,n+1):
        ans[min(j-i,abs(x-i)+abs(y-j)+1,abs(x-j)+abs(y-i)+1)]+=1
for i in range(1,n):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
x,y,a,b,c=map(int,input().split())
p=sorted(list(map(int,input().split())),reverse=True)[:x]
q=sorted(list(map(int,input().split())),reverse=True)[:y]
r=list(map(int,input().split()))
print(sum(sorted(p+q+r,reverse=True)[:x+y]))
Problem p03011 (python)

Fixed submission:
p,q,r=map(int,input().split())
print(sum([p,q,r])-max(p,q,r))

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
sl=[input() for i in range(h)]
ll=[[0]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        if sl[i][j]=='.':
            if j==0:
                ll[i][j]=1
            else:
                ll[i][j]=ll[i][j-1]+1
        else:
            ll[i][j]=0
rl=[[0]*w for i in range(h)]
for i in range(h):
    for j in range(w-1,-1,-1):
        if sl[i][j]=='.':
            if j==w-1:
                rl[i][j]=1
            else:
                rl[i][j]=rl[i][j+1]+1
        else:
            rl[i][j]=0
ul=[[0]*w for i in range(h)]
for j in range(w):
    for i in range(h):
        if sl[i][j]=='.':
            if i==0:
                ul[i][j]=1
            else:
                ul[i][j]=ul[i-1][j]+1
        else:
            ul[i][j]=0
dl=[[0]*w for i in range(h)]
for j in range(w):
    for i in range(h-1,-1,-1):
        if sl[i][j]=='.':
            if i==h-1:
                dl[i][j]=1
            else:
                dl[i][j]=dl[i+1][j]+1
        else:
            dl[i][j]=0
ans=0
for i in range(h):
    for j in range(w):
            ans=max(ans,ll[i][j]+rl[i][j]+ul[i][j]+dl[i][j]-3)
print(ans)
Problem p03013 (python)

Fixed submission:
import sys
sys.setrecursionlimit(1000000)
n,m=map(int,input().split())
al=[int(input()) for i in range(m)]+[n+1]
mod=1000000007
ms=[0]*(n+1)

def dd(n):
    if ms[n]>0:
        return ms[n]
    if n==1:
        ms[n]=1
        return 1
    if n==2:
        ms[n]=2
        return 2
    m=dd(n-1)+dd(n-2)
    ms[n]=m
    return m

ans=1
now=0
b=-1
for a in al:
    if a-1==b:
        print(0)
        exit()
    b=a
    if a-1!=now:
        ans=(ans%mod)*(dd(a-now-1)%mod)%mod
    now=a+1

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(1000000)
n,m=map(int,input().split())
al=[int(input()) for i in range(m)]+[n+1]
mod=1000000007
ms=[0]*n

def dd(n):
    if ms[n]>0:
        return ms[n]
    if n==1:
        ms[n]=1
        return 1
    if n==2:
        ms[n]=2
        return 2
    m=dd(n-1)+dd(n-2)
    ms[n]=m
    return m

ans=1
now=0
b=-1
for a in al:
    if a-1==b:
        print(0)
        exit()
    b=a
    if a-1!=now:
        ans=(ans%mod)*(dd(a-now-1)%mod)%mod
    now=a+1

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(1000000)
n,m=map(int,input().split())
al=[int(input()) for i in range(m)]
mod=1000000007
ms=[0]*n

def dd(n):
    if ms[n-1]>0:
        return ms[n-1]
    if n==1:
        ms[n-1]=1
        return 1
    if n==2:
        ms[n-1]=2
        return 2
    m=dd(n-1)+dd(n-2)
    ms[n-1]=m
    return m

ans=1
now=0
b=-1
for a in al:
    if a-1==b:
        print(0)
        exit()
    b=a
    if a-1!=now:
        ans=(ans%mod)*(dd(a-now-1)%mod)%mod
    now=a+1

if m!=0:
    ans=(ans%mod)*(dd(n-al[-1]-1)%mod)%mod
else:
    ans=dd(n)%mod
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000)
n,m=map(int,input().split())
al=[int(input()) for i in range(m)]
mod=1000000007
ms=[0]*n

def dd(n):
    if ms[n-1]>0:
        return ms[n-1]
    if n==1:
        ms[n-1]=1
        return 1
    if n==2:
        ms[n-1]=2
        return 2
    m=dd(n-1)+dd(n-2)
    ms[n-1]=m
    return m

ans=1
now=0
b=-1
for a in al:
    if a-1==b:
        print(0)
        exit()
    b=a
    if a-1!=now:
        ans=(ans%mod)*(dd(a-now-1)%mod)%mod
    now=a+1

ans=(ans%mod)*(dd(n-al[-1]-1)%mod)%mod
print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
al=[int(input()) for i in range(m)]
mod=1000000007
ms=[0]*n

def dd(n):
    if ms[n-1]>0:
        return ms[n-1]
    if n==1:
        ms[n-1]=1
        return 1
    if n==2:
        ms[n-1]=2
        return 2
    m=dd(n-1)+dd(n-2)
    ms[n-1]=m
    return m

ans=1
now=0
b=-1
for a in al:
    if a-1==b:
        print(0)
        exit()
    b=a
    if a-1!=now:
        ans=(ans%mod)*(dd(a-now-1)%mod)%mod
    now=a+1

ans=(ans%mod)*(dd(n-al[-1]-1)%mod)%mod
print(ans)
Problem p03834 (python)

Fixed submission:
s=input()
print(s.replace(',',' '))

Buggy submission (verdict: Runtime Error):
s=input()
print(s.replace(',',' ')
Problem p02623 (python)

Fixed submission:
# -*- coding: utf-8 -*-


# def main():
#     n, m, k = map(int, input().split())
#     A = list(map(int, input().split()))
#     B = list(map(int, input().split()))
#     a = A[0]
#     A2 = [a]
#     b = B[0]
#     B2 = [b]
#     for i in range(1, n):
#         a += A[i]
#         A2.append(a)
# 
#     for i in range(1, m):
#         b += B[i]
#         B2.append(b)
#     max = -2
#     for ia, aa in enumerate(A2):
#         for ib, bb in enumerate(B2):
#             if aa + bb > k:
#                 break
#             if ia + ib > max:
# 
#                 max = ia + ib
#     print(max + 2)
# 

def answer():
    N, M, K = map(int, input().split())


    A = list(map(int, input().split()))
    B = list(map(int, input().split()))

    a, b = [0], [0]
    for i in range(N):
        a.append(a[i] + A[i])
    for i in range(M):
        b.append(b[i] + B[i])

    ans, j = 0, M
    for i in range(N + 1):
        if a[i] > K:
            break
        while b[j] > K - a[i]:
            j -= 1
        ans = max(ans, i + j)
    print(ans)
if __name__ == '__main__':
    answer()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-


def main():
    n, m, k = map(int, input().split())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    a = A[0]
    A2 = [a]
    b = B[0]
    B2 = [b]
    for i in range(1, n):
        a += A[i]
        A2.append(a)

    for i in range(1, m):
        b += B[i]
        B2.append(b)
    max = -2
    for ia, aa in enumerate(A2):
        for ib, bb in enumerate(B2):
            if aa + bb > k:
                break
            if ia + ib > max:

                max = ia + ib
    print(max + 2)


def answer():
    N, M, K = map(int, input().split())


    A = list(map(int, input().split()))
    B = list(map(int, input().split()))

    a, b = [0], [0]
    for i in range(N):
        a.append(a[i] + A[i])
        for i in range(M):
            b.append(b[i] + B[i])

        ans, j = 0, M
        for i in range(N + 1):
        if a[i] > K:
        break
        while b[j] > K - a[i]:
        j -= 1
        ans = max(ans, i + j)
        print(ans)
if __name__ == '__main__':
    answer()
Problem p02623 (python)

Fixed submission:
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = [0]*(n+1)
d = [0]*(m+1)
for i in range(n):
    c[i+1] = a[i]+c[i]
for i in range(m):
    d[i+1] = b[i]+d[i]
for i in range(m+1)[::-1]:
    if d[i] <= k:
        x = i
        break
ans = x
for i in range(1,n+1):
    while c[i] + d[x] > k:
        if x >= 1:
            x -= 1
        else:
            break
    if c[i] + d[x] <= k:
        ans = max(ans,i+x)
print(ans)

Buggy submission (verdict: Runtime Error):
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

x = 0
for i in range(n):
    x += a[i]
    a[i] = x

x = 0
for i in range(m):
    x += b[i]
    b[i] = x

x = 0
for i in range(n):
    x = a[i]
    if x > k:
        x = a[i-1]
        ans = i
        j = i-2
        break
    if i + 1 == n:
        ans = n
        j = i-1

y = 0
for i in range(m):
    y = b[i]
    if x + y > k:
        while x + y > k and j >= 0:
            x = b[j]
            j -= 1
    if x + y <= k:
        ans = max(ans,i+j+2)

print(ans)

Buggy submission (verdict: Runtime Error):
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

x = 0
for i in range(n):
    x += a[i]
    a[i] = x

x = 0
for i in range(m):
    x += b[i]
    b[i] = x

x = 0
for i in range(n):
    x = a[i]
    if x > k:
        x = a[i-1]
        ans = i
        j = i-1
        break
    if i + 1 == n:
        ans = n
        j = i

y = 0
for i in range(m):
    y = b[i]
    if x + y > k:
        while x + y > k and j != -1:
            x = b[j]
            j -= 1
    if x + y <= k:
        ans = max(ans,i+j+2)

print(ans)

Buggy submission (verdict: Runtime Error):
#n = a の本:m = b の本
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
p = 0
z = 0
i = 0
j = 0

while p < k:
    if a[i] <= b[j]:
        p += a[i]
        z += 1
        i += 1
    else:
        p += b[j]
        z += 1
        j += 1
    if p > k:
        z -= 1

print(z)

Buggy submission (verdict: Runtime Error):
#n = a の本:m = b の本
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
p = 0
z = 0
i = 0
j = 0

while p < k:
    if a[i] < b[j]:
        p += a[i]
        z += 1
        i += 1
    elif a[i] > b[j]:
        p += b[j]
        z += 1
        j += 1
    else:
        if a[i+1] < b[j+1]:
            p += a[i]
            z += 1
            i += 1
        elif:
            p += b[j]
            z += 1
            j += 1

print(z)

Buggy submission (verdict: Runtime Error):
#n = a の本:m = b の本
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
p = 0
i = 0
j = 0
while p < k:
    if a[i] < b[j]:
        p += 1
        i += 1
    elif a[i] > b[j]:
        p += 1
        j += 1
    else:
        if a[i+1] < b[j+1]:
            p += 1
            i += 1
        else:
            p += 1
            j += 1

print(p)
Problem p02659 (python)

Fixed submission:
from decimal import Decimal
import math
a,b = input().split()
print(math.floor(int(a) * Decimal(b)))

Buggy submission (verdict: Runtime Error):
a,b = map(float,input().split())
print(int(a * b)
Problem p02693 (python)

Fixed submission:
k = int(input())
a,b = map(int,input().split())
i = b % k
if i == 0:
    print('OK')
    exit()

j = b - i

if a > j:
    print('NG')
else:
    print('OK')

Buggy submission (verdict: Runtime Error):
k = int(input())
a,b = map(int,input().split())
i = n % k
if i == 0:
    print('OK')
    exit()

j = n - i

if a > j:
    print('NG')
else:
    print('OK')
Problem p02729 (python)

Fixed submission:
n,m = map(int,input().split())
a = 0
n = n - 1
m = m - 1

while n > 0:
    a = a + n
    n = n - 1

while m > 0:
    a = a + m
    m = m - 1

print(a)

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

while n > 0:
    a = a + n
    n = n - 1

while m > 0:
    a = a + m
    m = m - 1

print(a)

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

while n > 0:
    a = a + n

while m > 0:
    a = a + m

print(a)
Problem p02753 (python)

Fixed submission:
s = input()
if s[0] == s[1] == s[2]:
    print('No')
else:
    print('Yes')

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

C = A / 0.08
D = B / 0.1

if int(C * 0.1) == B:
    if int(D * 0.08) == A:
        print(min(int(C),int(D)))
    else:
        print(int(C))
elif int(D * 0.08) == A:
    print(int(D))
else:
    print(-1)
Problem p02777 (python)

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

if s == u:
    a = a - 1
else:
    b = b - 1

print(str(a) + ' ' + str(b))

Buggy submission (verdict: Runtime Error):
s,t = input().split()
a,b = map(int,input().split())
u = input()

if s == u:
    a = a - 1
else:
    b = b - 1

print(a + ' ' + b)
Problem p02836 (python)

Fixed submission:
s = input()
n = len(s) // 2
p = n
j = -1

for i in range(n):
    if s[i] == s[j]:
        p -= 1
    j -= 1

print(p)

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s) // 2
p = n
j = -1

for i in range(n):
    if n[i] == n[j]:
        p -= 1
    j -= 1

print(p)
Problem p02987 (python)

Fixed submission:
s = input()
l = set(s)
if len(l) == 2 and s.count(s[0]) == 2:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = input()
l = set(s)
if len(l) == 2 and l.count(s[0]) == 2:
    print('Yes')
else:
    print('No')
Problem p03013 (python)

Fixed submission:
n,m = map(int,input().split())
a = list(int(input()) for i in range(m))
a.append(0)
dp = [0] * (n+1)
b = 0
for i in range(1,n+1):
    if a[b] == i:
        b += 1
    else:
        if i != 1 and i != 2:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            if i == 1:
                dp[1] = 1
            elif i == 2 and a[0] == 1:
                dp[2] = 1
            else:
                dp[1] = 1
                dp[2] = 2
print(dp[-1] % (10 ** 9 + 7))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = list(int(input()) for i in range(m))
dp = [0] * (n+1)
b = 0
for i in range(1,n+1):
    if a[b] == i:
        b += 1
        if b == m:
            b = 0
    else:
        if i != 1 and i != 2:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            if i == 1:
                dp[1] = 1
            elif i == 2 and a[0] == 1:
                dp[2] = 1
            else:
                dp[1] = 1
                dp[2] = 2
print(dp[-1] % (10 ** 9 + 7))
Problem p03017 (python)

Fixed submission:
n,a,b,c,d = map(int,input().split())
s = list(input())
s.insert(0,0)
for i in range(a,max(c,d)):
    if '#' == s[i] and '#' == s[i+1]:
        print('No')
        exit(0)
if c < d:
    print('Yes')
else:
    for i in range(b-1,d):
        if '.' == s[i] and '.' == s[i+1] and '.' == s[i+2]:
            print('Yes')
            exit(0)
    print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = list(input())
s.insert(0,0)
for i in range(a,max(c,d)+1):
    if '#' == s[i] and '#' == s[i+1]:
        print('No')
        exit(0)
if c < d:
    print('Yes')
else:
    for i in range(b,d+1):
        if '.' == s[i] and '.' == s[i+1] and '.' == s[i+2]:
            print('Yes')
            exit(0)
    print('No')
Problem p03036 (python)

Fixed submission:
r,d,x = map(int,input().split())
p = []
for i in range(10):
    x = r * x - d
    p.append(x)

for i in range(10):
    print(p[i])

Buggy submission (verdict: Runtime Error):
r,d,x = map(int,input().split())
p = []
for i in range(10):
    x = r * x - d
    p[i] = x

for i in range(10):
    print(p[i])
Problem p03041 (python)

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

s[k-1] = s[k-1].lower()
print(''.join(s))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
s = input()
s[k-1] = s[k-1].lower()
print(s)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
s = input()
s[k-1] = s.lower(s[k-1])
print(s)
Problem p03107 (python)

Fixed submission:
s = list(input())
p = s.count('0')
q = s.count('1')
print(2 * min(p,q))

Buggy submission (verdict: Runtime Error):
s = list(input())
t = []
p = 0
flg = True

while flg:
    flg = False
    j = 0
    for i in range(len(s)):
        if s[j] == s[j+1]:
            t.append(s[j])
            j += 1
        else:
            p += 2
            j += 2
        if j >= len(s) - 1:
            if j == len(s) - 1:
                t.append(s[j])
                break
            else:
                break
    if len(t) == len(s) or len(t) == 0:
        pass
    else:
        s = t
        t.clear()
        flg = True

print(p)
Problem p03242 (python)

Fixed submission:
n = list(input())
i = 0

while i < 3:
    if n[i] == '1':
        n[i] = '9'
        i = i + 1
    else:
        n[i] = '1'
        i = i + 1

print(''.join(n))

Buggy submission (verdict: Runtime Error):
n = input()
print(s.translate(str.maketrans({'1':'9','9':'1'})))

Buggy submission (verdict: Runtime Error):
n = input()
i = 0
for number in n:
    if number == '1':
        m[i] = '9'
        i = i + 1
    elif number == '9':
        m[i] = '1'
        i = i + 1
    else:
        m[i] = n[i]
        i = i + 1

print(n)

Buggy submission (verdict: Runtime Error):
n = input()
i = 0
for number in n:
    if number == '1':
        n[i] = '9'
        i = i + 1
    elif number == '9':
        n[i] = '1'
        i = i + 1
    else:
        i = i + 1

print(n)
Problem p03631 (python)

Fixed submission:
n = int(input())
i = str(n)
m = n // 100
if str(m) == i[-1]:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
m = n // 100
if m == n[-1]:
    print('Yes')
else:
    print('No')
Problem p03804 (python)

Fixed submission:
n,m = map(int,input().split())
a = [list(input()) for i in range(n)]
b = [list(input()) for i in range(m)]

for i in range(n-m+1):
    for j in range(n-m+1):
        t = 1
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l] != b[k][l]:
                    t = 0
        if t == 1:
            print('Yes')
            exit(0)

print('No')

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [list(input()) for i in range(n)]
b = [list(input()) for i in range(m)]

for i in range(n):
    for j in range(n):
        t = 1
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l] != b[k][l]:
                    t = 0
        if t == 1:
            print('Yes')
            exit(0)

print('No')
Problem p03834 (python)

Fixed submission:
a,b,c = input().split(',')
print(a + ' ' + b + ' ' + c)

Buggy submission (verdict: Runtime Error):
a,b,c = input().split(',')
print(a + '' + B + '' + C)
Problem p02546 (python)

Fixed submission:
p =input()
if p[len(p) - 1] == 's':
    print(p+'es')
else:
    print(p+'s')

Buggy submission (verdict: Runtime Error):
p=input()
if p[len(p)-1]=='s':
  p.append('es')
  print(p)
else:
  p.append('s')
  print(p)
Problem p03315 (python)

Fixed submission:
s=input()
ans=0
for i in range(4):
  if s[i]=='+':
    ans += 1
  else:
    ans -= 1
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
ans=0
for i in range(4):
  if s[i]='+':
    ans += 1
  else:
    ans -= 1
print(ans)
Problem p03835 (python)

Fixed submission:
k,s=map(int, input().split())
count = 0
for x in range(k+1):
  for y in range(k+1):
    if 0 <= (s - x - y) and (s - x - y) <= k:
      count += 1
print(count)

Buggy submission (verdict: Runtime Error):
k,s=int(input())
count = 0
for x in range(k+1):
  for y in range(k+1):
    if 0 <= (s - x - y) and (s - x - y) <= k:
      count += 1
print(count)
Problem p02661 (python)

Fixed submission:
import statistics

n = int(input())
la = []
lb = []
for i in range(n):
  a, b = map(int, input().split())
  la.append(a)
  lb.append(b)
a = statistics.median(la)
b = statistics.median(lb)
if n % 2 == 1:
  print(b - a + 1)
else:
  print(int((b - a) * 2 + 1))

Buggy submission (verdict: Runtime Error):
n = int(input())
la = []
lb = []
for i in range(n):
  a, b = map(int, input().split())
  la.append(a)
  lb.append(b)
a = statistics.median(la)
b = statistics.median(lb)
if n % 2 == 1:
  print(b - a + 1)
else:
  print((b - a) * 2 - 1)
Problem p02693 (python)

Fixed submission:
k = int(input())
a, b = map(int, input().split())
ka = a // k
kb = b // k
if b - a >= k - 1:
  print("OK")
elif kb - ka > 0:
  print("OK")
elif a % k == 0 or b % k == 0:
  print("OK")
else:
  print("NG")

Buggy submission (verdict: Runtime Error):
k = input()
a, b = map(int, input().split())
ka = a // k
kb = b // k
if b - a >= k - 1:
  print("OK")
elif kb - ka > 0:
  print("OK")
else:
  print("NG")

Buggy submission (verdict: Runtime Error):
k = input()
a, b = map(int, input().split())
if (b % k) - (a % k) <= 0 or b - a >= 0:
  print("OK")
else:print("NG")

Buggy submission (verdict: Runtime Error):
k = input()
a, b = map(int, input().split())
if b//k - a//k <= 0 or b - a >= 0:
  print("OK")
else:print("NG")
Problem p02729 (python)

Fixed submission:
n, m = map(int, input().split())
c = 0
if n >= 2:
  c += n*(n-1) /2
if m >= 2:
  c += m*(m-1) /2
print(int(c))

Buggy submission (verdict: Runtime Error):
n, m = map(int, unput().split())
c = 0
if n >= 2:
  c += n*(n-1) /2
if m >= 2:
  c += n*(n-1) /2
print(c)
Problem p02987 (python)

Fixed submission:
x=list(input())
a=x[0]
b=x[1]
c=x[2]
d=x[3]
if a==b and a!=c:
  if c==d:
    print("Yes")
  else:
    print("No")
elif a==c and a!=b:
  if b==d:
    print("Yes")
  else:
    print("No")
elif a==d and a!=b:
  if b==c:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a=set(list(map(input().split())))
print("Yes" if len(a)==2 else "No")

Buggy submission (verdict: Runtime Error):
x=list(input())
a=x[0]
b=x[1]
c=x[2]
d=x[3]
if a==b and a!=c:
  if c==d:
    print(Yes)
  else:
    print(No)
elif a==c and a!=b:
  if b==d:
    print(Yes)
  else:
    print(No)
elif a==d and a!=b:
  if b==c:
    print(Yes)
  else:
    print(No)
else:
  print(No)