Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N, A, B = [int(input()) for i in range(3)]
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += n

print(count)


Fixed submission:
N, A, B = map(int, input().split())
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += n

print(count)

Buggy python submission (verdict: Runtime Error):
N, A, B = [int(input()) for i in range(3)]
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += n

print(count)


Fixed submission:
N, A, B = map(int, input().split())
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += n

print(count)

Buggy python submission (verdict: Runtime Error):
N, A, B = [int(input()) for i in range(3)]
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += 1

print(count)


Fixed submission:
N, A, B = map(int, input().split())
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += n

print(count)

Buggy python submission (verdict: Runtime Error):
N, A, B = [int(input()) for i in range(3)]
count = 0

for n in range(1:N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += 1

print(count)

Fixed submission:
N, A, B = map(int, input().split())
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += n

print(count)
Buggy python submission (verdict: Runtime Error):
n = input()
s = list(map(int, input.split()))
ans = 0

while all(a%2==0 for a in s):
  ans +=1
  s = [a/2 for a in s]

print(ans)


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

while all(a%2==0 for a in s):
  ans +=1
  s = [a/2 for a in s]

print(ans)

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

while all(a%2==0 for a in s):
  ans +=1
  for a in s:
    s = a/2

print(ans)


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

while all(a%2==0 for a in s):
  ans +=1
  s = [a/2 for a in s]

print(ans)

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

while all(a%2==0, for a in s):
  ans +=1
  for a in s:
    s = a/2

print(ans)


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

while all(a%2==0 for a in s):
  ans +=1
  s = [a/2 for a in s]

print(ans)

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

while all(a%2==0, for a in s):
  ans +=1
  for a in s:
    s = s/2

print(ans)


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

while all(a%2==0 for a in s):
  ans +=1
  s = [a/2 for a in s]

print(ans)

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

while all(a%2==0, for a in s):
  ans +=1
  
  for a in s:
    a = a/2

print(ans)


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

while all(a%2==0 for a in s):
  ans +=1
  s = [a/2 for a in s]

print(ans)

Buggy python submission (verdict: Runtime Error):
n = imput()
s = list(map(int, inpit.split()))
ans = 0

while all(a%2==0, for a in s):
  ans +=1
  
  for a in s:
    a = a/2

print(ans)

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

while all(a%2==0 for a in s):
  ans +=1
  s = [a/2 for a in s]

print(ans)
Buggy python submission (verdict: Runtime Error):
a, b=map(input.split())
print(a*b)

Fixed submission:
a, b=map(int, input().split())
print(a*b)
Buggy python submission (verdict: Runtime Error):
import sys
from fractions import gcd
from functools import reduce
from itertools import combinations

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    mod = 100_000_000_7
    N, M = il()
    a = [True] * (N+1)
    for b in imi(M):
        a[b] = False
    dp = [0] * (N + 1)
    dp[0] = 1
    for now in range(N):
        for next in range(now + 1, min(N, now + 2)+1):
            if a[next]:
                dp[next] += dp[now]
                dp[next] %= mod
    return dp[N]


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

Fixed submission:
import sys
from fractions import gcd
from functools import reduce
from itertools import combinations

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    mod = 1000000007
    N, M = il()
    a = [True] * (N+1)
    for b in imi(M):
        a[b] = False
    dp = [0] * (N + 1)
    dp[0] = 1
    for now in range(N):
        for next in range(now + 1, min(N, now + 2)+1):
            if a[next]:
                dp[next] += dp[now]
                dp[next] %= mod
    return dp[N]


if __name__ == "__main__":
    print(solve())
Buggy python submission (verdict: Time Limit Exceeded):
import re
import sys
from fractions import gcd
from functools import reduce
from itertools import combinations, product

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    A = il()
    ans = 0
    for n in combinations(A, N - 1):
        ans = max(ans, reduce(gcd, n))
    return ans


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


Fixed submission:
import sys
from fractions import gcd
from functools import reduce
from itertools import combinations

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    A = il()
    b = [0] * N
    c = [0] * N
    for i in range(1, N):
        b[i] = gcd(b[i - 1], A[i - 1])
    for i in range(N - 1)[::-1]:
        c[i] = gcd(c[i + 1], A[i + 1])
    d = [gcd(b[i], c[i]) for i in range(N)]
    return max(d)


if __name__ == "__main__":
    print(solve())
Buggy python submission (verdict: Runtime Error):
import sys

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    AB = iml(N)
    ll = []
    for a, b in AB:
        ll.append(a + b)
    ind = np.argsort(ll)
    t = [AB[i][0] for i in ind[::2]]
    a = [AB[i][1] for i in ind[1::2]]
    return sum(t) - sum(a)


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


Fixed submission:
import bisect
import sys

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N, a, b = il()
    return "{} {}".format(min(a, b), max(0, a - (N - b)))


if __name__ == "__main__":
    print(solve())
Buggy python submission (verdict: Time Limit Exceeded):
import bisect
import sys

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    # AB = iml(N)
    takahashi = {}
    aoki = {}
    for i in range(N):
        a = il()
        takahashi[i] = a[0]
        aoki[i] = a[1]
    T = [i[0] for i in sorted(takahashi.items(), key=lambda x: x[1])]
    A = [i[0] for i in sorted(aoki.items(), key=lambda x: x[1])]
    ind = [T.pop()]
    t = takahashi[ind[0]]
    a = 0
    for i in range(1, N):
        if i % 2 == 1:
            while A:
                j = A.pop()
                if j not in ind:
                    break
            a += aoki[j]
        else:
            while T:
                j = T.pop()
                if j not in ind:
                    break
            t += takahashi[j]
        ind.append(j)
    return t - a


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


Fixed submission:
import sys

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    AB = iml(N)
    ll = []
    for a, b in AB:
        ll.append(a + b)
    ind = np.argsort(ll)[::-1]
    t = [AB[i][0] for i in ind[::2]]
    a = [AB[i][1] for i in ind[1::2]]
    return sum(t) - sum(a)


if __name__ == "__main__":
    print(solve())
Buggy python submission (verdict: Time Limit Exceeded):
import sys

def bubble_sort(arr):
    counter = 0
    change = True
    for i in range(len(arr)):
        for j in range(len(arr) - 1, i, -1):
            if arr[j] < arr[j - 1]:
                arr[j], arr[j - 1] = arr[j - 1], arr[j]
                counter += 1
        if change == 0: break
    return arr, counter


def solve():
    input = sys.stdin.readline
    S = list(input().replace("B", "2").replace("W", "1"))[:-1]
    S, counter = bubble_sort(S)

    print(counter)


solve()


Fixed submission:
import sys


def solve():
    input = sys.stdin.readline
    S = list(input().replace("B", "2").replace("W", "1"))[:-1]
    N = len(S)
    ans = N * (N - 1) // 2
    data = [0] * (N + 1)

    def add(k, v):
        while k <= N:
            data[k] += v
            k += k & -k

    def get(k):
        s = 0
        while k:
            s += data[k]
            k -= k & -k
        return s

    for a in map({a: i + 1 for i, a in enumerate(sorted(S))}.__getitem__, S):
        ans -= get(a)
        add(a, 1)

    print(ans)


solve()

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


def bubble_sort(arr):
    counter = 0
    for i in range(len(arr)):
        for j in range(len(arr) - 1, i, -1):
            if arr[j] < arr[j - 1]:
                arr[j], arr[j - 1] = arr[j - 1], arr[j]
                counter += 1
    return arr, counter


def solve():
    input = sys.stdin.readline
    S = list(input().replace("B", "2").replace("W", "1"))[:-1]
    S, counter = bubble_sort(S)

    print(counter)


solve()


Fixed submission:
import sys


def solve():
    input = sys.stdin.readline
    S = list(input().replace("B", "2").replace("W", "1"))[:-1]
    N = len(S)
    ans = N * (N - 1) // 2
    data = [0] * (N + 1)

    def add(k, v):
        while k <= N:
            data[k] += v
            k += k & -k

    def get(k):
        s = 0
        while k:
            s += data[k]
            k -= k & -k
        return s

    for a in map({a: i + 1 for i, a in enumerate(sorted(S))}.__getitem__, S):
        ans -= get(a)
        add(a, 1)

    print(ans)


solve()
Buggy python submission (verdict: Runtime Error):
#-*- coding: utf-8 -*-
print(['No', 'Yes'][input().count('9')])


Fixed submission:
#-*- coding: utf-8 -*-
print(['No', 'Yes']['9' in input()])
Buggy python submission (verdict: Time Limit Exceeded):
import sys

input = sys.stdin.readline


def ii():
    return int(input())


def il():
    return list(map(int, input().split()))


K, S = il()
c = 0
for x in range(K + 1):
    for y in range(K + 1):
        for z in range(K + 1):
            if (x + y + z) == S:
                c += 1
print(c)


Fixed submission:
import sys

input = sys.stdin.readline


def ii():
    return int(input())


def il():
    return list(map(int, input().split()))


K, S = il()
c = 0
for x in range(K + 1):
    for y in range(K + 1):
        if 0 <= (S - (x + y)) <= K:
            c += 1
print(c)
Buggy python submission (verdict: Runtime Error):
def serch_1(b,x):
    i=1
    an=0
    while 1:
        if b.count(x+i)==0:
            an=x+i
            break
        else:
            i=i+1
    return an

def serch_2(b,x):
    i=1
    an=0
    while 1:
	    if b.count(x-i)==0:
		    an=x-i
		    break
	    else:
		    i=i+1
    return an
def hikaku(a,b,x):
    if abs(a-x)>=abs(b-x):
    	return b
    else:
        return a
x = int(input())
n = int(input())
a = list(map(int,input().split()))
print(serch_1(a,x),serch_2(a,x))
if a.count(x)==0:
	print(x)
else:
	print(hikaku(serch_1(a,x),serch_2(a,x),x))

    

Fixed submission:
def serch_1(b,x):
    i=1
    an=0
    while 1:
        if b.count(x+i)==0:
            an=x+i
            break
        else:
            i=i+1
    return an

def serch_2(b,x):
    i=1
    an=0
    while 1:
	    if b.count(x-i)==0:
		    an=x-i
		    break
	    else:
		    i=i+1
    return an
def hikaku(a,b,x):
    if abs(a-x)>=abs(b-x):
    	return b
    else:
        return a
s = list(map(int,input().split()))
# n = int(input())
a = list(map(int,input().split()))
# print(serch_1(a,x),serch_2(a,x))
x=s[0]
n=s[1]
if a.count(x)==0:
	print(x)
else:
	print(hikaku(serch_1(a,x),serch_2(a,x),x))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def main():
    #入力
    [n, k] = [int(i) for i in input().split()] 
    h = [int(i) for i in input().split()] 

    print(len(able_ride_jet(k, h)))


def able_ride_jet(const, heights):
    """ ジェットコースターに乗れる人の身長のリストを返す関数
    """
    return list(filter(lambda x: x >= const, heights))


if __name__ == '__main__':
    main()

Fixed submission:
n = int(input())

if n % 2 == 0:
  ans = 1 / 2
else:
  ans = (n // 2 + 1) / n
  
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys

T = int(sys.argv[1])
X = int(sys.argv[2])

print(T/X)

Fixed submission:
T, X=[int(i) for i in input().split()]
print(T/X)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H = map(int, input().split())

H.sorted(reverse=True)

if K >= N:
    print(0)
else:
    for i in range(K):
        del H[i]
    print(sum(H))


Fixed submission:
H, A = map(int, input().split(" "))

print(-(-H//A))
Buggy python submission (verdict: Time Limit Exceeded):
import fractions
N = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, N):
    ans = ans * a[i] // fractions.gcd(ans, a[i])

B = []
for i in range(N):
    B.append(ans//a[i])

print(sum(B) % (10**9 + 7))

Fixed submission:
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

def lcm(a,b):
    return a*b//gcd(a,b)

N = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, N):
    ans = ans * a[i] // gcd(ans, a[i])

B = []
for i in range(N):
    B.append(ans//a[i])

print(sum(B) % (10**9 + 7))
Buggy python submission (verdict: Runtime Error):
S,T = input().split()
ptint(T+S)

Fixed submission:
S,T=input().split(" ")
print(T+S)
Buggy python submission (verdict: Runtime Error):
import math

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A, B))

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

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(A, B))

Buggy python submission (verdict: Runtime Error):
import math

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A, B))

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

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

def lcm(x, y):
    return (x * y) // gcd(x, y)

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

hoge = []

if N % 2 != 0:
    purint(0)
else:
    for i in range(1, 19):
        hoge.append(N // 10**i)
    print(sum(hoge))


Fixed submission:
N = int(input())

hoge = []

if N % 2 != 0:
    print(0)
else:
    for i in range(1, 40):
        hoge.append((N // 10)  // (5 ** i))
    print(sum(hoge) + (N // 10))
Buggy python submission (verdict: Runtime Error):
O = list(input().split(" "))
E = list(input().split(" "))

ans = []
for i in range(O.len):
  ans.append(O[i])
  ans.append(E[i])

print("".join(ans))

Fixed submission:
O = list(input())
E = list(input())

ans = []
for i in range(len(O)):
    ans.append(O[i])
    if len(E) > i:
        ans.append(E[i])
    else:
        break
print("".join(ans))
Buggy python submission (verdict: Runtime Error):
a=int(input())
k=2*r*3.14

Fixed submission:
from math import acos
a=int(input())
k=2*a*2*acos(0.0)
print(k)
Buggy python submission (verdict: Runtime Error):
n,m= map(int,input().split())
a=list(map(int, intput().split()))
sum=0
for _ in range(len(a)):
  sum+=a[i]
if sum>n: 
  print("-1")
else:
  print(n-sum)
	

Fixed submission:
n,m= map(int,input().split())
a=list(map(int, input().split()))
sum=0
for i in range(len(a)):
  sum+=a[i]
if sum>n: 
  print("-1")
else:
  print(n-sum)
Buggy python submission (verdict: Runtime Error):
from math import ceil
n=int(input())
s=input()
r=0
g=0
b=0
for i in range (len(s)):
  if s[i]=='R':
    r+=1
  elif s[i]=='B':
    b+=1
  else:
    g+=1
c=0
for i in range(1,n//2,1):
  for j in range(0,n-2*i,1):
    if s[j+0*i]!=s[j+1*i] and s[j+1*i]!=s[j+2*i] and s[j+2*i]!=s[j+0*i]:
      c+=1;
      
      
ans=r*g*b-c;
print(ans)

Fixed submission:
a=int(input())
while(a>0):
  k=a%10
  if k==7:
    print("Yes")
    exit()
  a//=10
print("No")
Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
a=list(map(int, input().split()))
dp=[0]*n
dp[0]=0
dp[1]=math.max(a[0],a[1])
curr=a[0]
for i in range(2,n):
  if i&1==1:
    curr+=a[i-1]
    dp[i]=math.max(curr,dp[i-2]+a[i])
  else dp[i]=math.max(dp[i-2]+a[i],dp[i-1])
print(dp[n-1])


Fixed submission:
import math
n=int(input())
a=list(map(int, input().split()))
dp=[0]*n
dp[0]=0
dp[1]=max(a[0],a[1])
curr=a[0]
for i in range(2,n):
  if i&1==1:
    curr+=a[i-1]
    dp[i]=max(curr,dp[i-2]+a[i])
  else: dp[i]=max(dp[i-2]+a[i],dp[i-1])
print(dp[n-1])
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
n=n-(n//k)*k
print(min(n,k-n))

Fixed submission:
a,b,c=map(int,input().split())
t=a
a=b
b=t
t=a
a=c
c=t
print(a,end=" ")
print(b,end=" ")
print(c)
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
print(-(-h*w//2) if h*w>=h+w else 1)


Fixed submission:
a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
n=int(input())
print(a[n-1])
Buggy python submission (verdict: Runtime Error):
import math
a,b=map(int,input().split())
if a==1|| b==1:
  k=1
elif:
	k=math.ceil((a*b)/2)
print(k)


Fixed submission:
import math
H,W = map(int, input().split())

if H == 1 or W == 1:
    print(1)
elif H * W % 2 == 0:
    print( math.floor((H * W) /2 ))
else:
    print(math.floor((H * W) / 2) + 1)
Buggy python submission (verdict: Runtime Error):
from math import sqrt
a,b,c=map(int,input().split())
k=c-a-b
if k>0 and k*k> 4*a*b:
  print("Yes")
else print("No")


Fixed submission:
from math import sqrt
a,b,c=map(int,input().split())
k=c-a-b
if k>0 and k*k> 4*a*b:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
def pair(n,count):
    l=[];su=0
    for i in range(0,len(n),2):
        sub=list()
        sub.append(n[i:i+2])
        su=su+sub[0][0]
        l.append(sub)
    return(su)
        

        
ip1=int(input())
ip2=[]
for i in range(ip1*2):
    ip2.append(int(input()))
ip2.sort()
print(pair(ip2,ip1))

Fixed submission:
def pair(n,count):
    l=[];su=0
    for i in range(0,len(n),2):
        sub=list()
        sub.append(n[i:i+2])
        su=su+sub[0][0]
        l.append(sub)
    return(su)
        
def ip11(): return int(input())
def ip22(): return [int(_) for _ in input().split()]
        

def main():
    ip1=ip11()
    ip2=ip22()
    ip2.sort()
    print(pair(ip2,ip1))
    return
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
A=[int(input()) for i in range(5)]
K = int(input())

if(A[-1] - A[0] <= K):
  print("Yay!")
 else:
  print(":(")



Fixed submission:
A=[int(input()) for i in range(5)]
K = int(input())

if(A[-1] - A[0] <= K):
  print("Yay!")
else:
  print(":(")
Buggy python submission (verdict: Runtime Error):
a=input()
for i in range(3):
  if a[i]==a[i+1]==a[i+2]:
    print('Yes')
    break
else:
  print('No')

Fixed submission:
a=input()
for i in range(2):
  if a[i]==a[i+1]==a[i+2]:
    print('Yes')
    break
else:
  print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import copy 
n = int(input())
        
a = [int(input()) for _ in range(n)]
        
for i in range(n):
  temp = copy.deepcopy(a)
  temp[i] = 0
  print(max(temp))

Fixed submission:
n = int(input())
        
a = [(int(input()), i) for i in range(n)]
a.sort()
max_, max_index = a[-1]

for i in range(n):
  if i != max_index:
  	print(max_)
  else:
  	print(a[-2][0])
Buggy python submission (verdict: Runtime Error):
l, r = [int(i) for i in input.split()]

if l//2019 == r//2019:
  print(l*(l+1)%2019)
  
else:
  print(0)
  

Fixed submission:
l, r = [int(i) for i in input().split()]

if l//2019 == r//2019:
  min_mod = 2017*2018
  for i in range(l, r):
    for j in range(l+1, r+1):
      temp = (i*j)%2019
      if temp < min_mod:
        min_mod = temp
  print(min_mod)
  
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
n,l = list(map(int,input().split()))

flavor = int(n*(l+(l+n-1))/2)

if (l<0):
  if l>=(-n+1):
  	print(flavor)
  elif l<(-n+1):
    print(flavor-(l+n-1))
    

else:
  print(flavor-l)

Fixed submission:
import sys
s = str(input())

k = None
for i in s:
  if i==k:
    print("Bad")
    sys.exit()
  k = i

print("Good")
Buggy python submission (verdict: Runtime Error):
n,k = list(map(int, input().split()))
s = str(input())

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

Fixed submission:
import functools
def a(c0, c1):
   return c0+c1

n,k = list(map(int, input().split()))
s = list(str(input()))

s[k-1] = s[k-1].lower()
d = functools.reduce(a, s)

print(d)
Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))

if 0 in a:
  b = list(map(abs, a))
  print(sum(b))
  
else:
  if (a[a<0].size % 2) == 0:
    b = list(map(abs, a))
    print(sum(b))
  else:
    b = list(map(abs, a))
    c = sorted(b).reverse()
    d = c.pop()
    print(sum(c))

    

Fixed submission:
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))

if 0 in a:
  b = list(map(abs, a))
  print(sum(b))
  
else:
  if (a[a<0].size % 2) == 0:
    b = list(map(abs, a))
    print(sum(b))
  else:
    b = list(map(abs, a))
    b = sorted(b)
    b.reverse()
    c = b.pop()
    print(sum(b)-c)