Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n=int(input())
a=list(np.fromstring(input(),int,sep=' '))
a_=list(set(a))
dic={}
ans=0
for i in a_:
    dic[i]=a.count(i)
for i in dic.values():
    ans+=i*(i-1)//2
    
for i in range(n):
    print(ans-(dic[a[i]]-1))

Fixed submission:
import numpy as np
import collections
n=int(input())
a=list(np.fromstring(input(),int,sep=' '))
dic=collections.Counter(a)
ans=0

for i in dic.values():
    ans+=i*(i-1)//2
    
for i in range(n):
    print(ans-(dic[a[i]]-1))

Buggy python submission (verdict: Runtime Error):
import numpy as np
n=int(input())
a=list(np.fromstring(input(),int,sep=' '))
a_=list(set(a))
dic={}
ans={}
for i in a_:
    dic[i]=a.count(i)
    
def check(x):
    lst_=lst
    count=0
    ans=0
    dic_=dic
    for i in a_:
        if x==i:
            dic_[x]-=1
            break
    for i in dic_.values():
        ans+=i*(i-1)//2
    dic_[x]+=1
    return ans

for i in a_:
    ans[i]=check(i)

for i in a:
    print(ans[i])

Fixed submission:
import numpy as np
import collections
n=int(input())
a=list(np.fromstring(input(),int,sep=' '))
dic=collections.Counter(a)
ans=0

for i in dic.values():
    ans+=i*(i-1)//2
    
for i in range(n):
    print(ans-(dic[a[i]]-1))
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
x=c-a-b
if 4*a*b<x**2:
    print("Yes")
else:
    print("No")

Fixed submission:
num=[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]
k=int(input())
print(num[k-1])
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
if h==1 ir w==1:
    print(1)
else:
    print((h*w)//2 if h%2==0 else ((h-1)*w)//2-(-w//2))

Fixed submission:
h,w=map(int,input().split())
if h==1 or w==1:
    print(1)
else:
    print((h*w)//2 if h%2==0 else ((h-1)*w)//2-(-w//2))
Buggy python submission (verdict: Runtime Error):
import numpy as np
n=int(input())
x=np.fromstring(input(),int,sep=' ')
p=0
hoge=np.inf
for i in range(1,np.max(x)+1):
    sux=sum((x-i)**2)
    if sux<hoge:
        p=i
        hoge=sux
print(hoge)

Fixed submission:
n,r=map(int,input().split())
rate=0
if n<10:
    print(r+100*(10-n))
else:
    print(r)

Buggy python submission (verdict: Runtime Error):
import numpy as np
n=int(input())
x=np.fromstring(input(),int,sep=' ')
print(x)
p=0
hoge=np.inf
for i in range(1,np.max(x)+1):
    sux=sum((x-i)**2)
    if sux<hoge:
        p=i
        hoge=sux
print(hoge)

Fixed submission:
n,r=map(int,input().split())
rate=0
if n<10:
    print(r+100*(10-n))
else:
    print(r)
Buggy python submission (verdict: Runtime Error):
n=input()
def check(n,st_num):
    count=0
    dic={1:1,0:2}
    for i in range(1,-(-len(n)//2)):
        try:
            if n[2*i]+n[2*i+1]==st_num:
                count+=0
            else:
                count+=dic[abs(int(n[2*i])+int(n[2*i+1])-1)]
        except:
            if n[2*i]!=st_num[0]:
                count+=1
    
    return count
    
if '1' not in n:
    print(n//2)
if n[:2]=="10":
    print(check(n,"10"))
elif n[:2]=="01":
    print(check(n,"01"))
else:
    print(0 if len(n)==1 else check(n,"10")+1)

Fixed submission:
#124
n=input()
def check(n,st_num):
    count=0
    dic={1:1,0:2}
    for i in range(1,-(-len(n)//2)):
        try:
            if n[2*i]+n[2*i+1]==st_num:
                count+=0
            else:
                count+=dic[abs(int(n[2*i])+int(n[2*i+1])-1)]
        except:
            if n[2*i]!=st_num[0]:
                count+=1
    
    return count
    
if '1' not in n:
    print(len(n)//2)
    exit()
if n[:2]=="10":
    print(check(n,"10"))
elif n[:2]=="01":
    print(check(n,"01"))
else:
    print(0 if len(n)==1 else min([check(n,"10")+1,check(n,"01")+1]))
Buggy python submission (verdict: Time Limit Exceeded):
import re
tg="AC"
n,q=map(int,input().split())
text=input()
ans=[]

def check():
    l,r=map(int,input().split())
    text_=text[l-1:][:r-1]
    count=re.findall(tg,text_)
    ans.append(len(count))
    
for i in range(q):
    check()

for i in ans:
    print(i)

Fixed submission:
n,q=map(int,input().split())
text=input()
sum_=[]
count=0
for i in range(n):
    if text[i-1]=='A' and text[i]=='C':
        count+=1
    sum_.append(count)
for i in range(q):
    l,r=map(int,input().split())
    print(sum_[r-1]-sum_[l-1])

Buggy python submission (verdict: Runtime Error):
tg="AC"
n,q=map(int,input().split())
text=input()
ans=[]

def check():
    l,r=map(int,input().split())
    text_=text[l-1:][:r-1]
    count=re.findall(tg,text_)
    ans.append(len(count))
    
for i in range(q):
    check()

for i in ans:
    print(i)

Fixed submission:
n,q=map(int,input().split())
text=input()
sum_=[]
count=0
for i in range(n):
    if text[i-1]=='A' and text[i]=='C':
        count+=1
    sum_.append(count)
for i in range(q):
    l,r=map(int,input().split())
    print(sum_[r-1]-sum_[l-1])
Buggy python submission (verdict: Runtime Error):
A1, A2, A3 = map(int, input.split())
if A1 + A2 + A3 >= 22:
    print("bust")
else:
    print("win")

Fixed submission:
A1, A2, A3 = map(int, input().split())
x = A1 + A2 + A3
if x >= 22:
    print("bust")
else:
    print("win")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))
ans = 0

for i in range(n-1):
    ans += A[i]*sum(A[i+1:])
    ans %= 1000000007

print(ans)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
ans = 0
total = sum(A[1:])

for i in range(n-1):
    ans += A[i]*total
    total -= A[i+1]
    ans %= 1000000007

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))
ans = 0

for i in range(n-1):
    for j in range(i+1, n):
        ans += A[i]*A[j]
        ans %= 1000000007

print(ans)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
ans = 0
total = sum(A[1:])

for i in range(n-1):
    ans += A[i]*total
    total -= A[i+1]
    ans %= 1000000007

print(ans)

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

n = int(input())
A = list(map(int, input().split()))
ans = 0

for pair in itertools.combinations(A, 2):
    ans += (pair[0]*pair[1])
    ans %= 1000000007

print(ans)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
ans = 0
total = sum(A[1:])

for i in range(n-1):
    ans += A[i]*total
    total -= A[i+1]
    ans %= 1000000007

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from operator import mul
from functools import reduce
n, k = map(int, input().split())
A = list(map(int, input().split()))
before = reduce(mul, A[:k])

for i in range(1, n-k+1):
    tmp = reduce(mul, A[i:k+i])
    if tmp > before:
        print("Yes")
    else:
        print("No")
    before = tmp

Fixed submission:
n, k = map(int, input().split())
A = list(map(int, input().split()))
before = sum(A[:k])

for i in range(n-k):
    tmp = before + A[i+k] - A[i]
    if tmp > before:
        print("Yes")
    else:
        print("No")
    before = tmp
Buggy python submission (verdict: Runtime Error):
import heapq
n = int(input())
A = list(map(int, input().split()))
A = sorted(A, reverse=True)
ans = 0
q = []
heapq.heappush(q, A[0]*-1)
for i in range(1, n):
    print(q)
    tmp = heapq.heappop(q)
    ans += tmp
    heapq.heappush(q, A[i] * -1)
    heapq.heappush(q, A[i] * -1)

print(ans*-1)

Fixed submission:
import heapq
n = int(input())
A = list(map(int, input().split()))
A = sorted(A, reverse=True)
ans = 0
q = []
heapq.heappush(q, A[0]*-1)
for i in range(1, n):
    tmp = heapq.heappop(q)
    ans += tmp
    heapq.heappush(q, A[i] * -1)
    heapq.heappush(q, A[i] * -1)

print(ans*-1)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N = int(input())
    A = list(map(int, input().split()))

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

    total = 1
    for i in range(N):
        total *= A[i]

    if total > 10 ** 18:
        print(-1)
    else:
        print(total)

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))

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

    total = 1
    for a in A:
        total *= a

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

if __name__ == '__main__':
    main()

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

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

total = 1
for i in range(N):
    total *= A[i]

if total > 10 ** 18:
    print(-1)
else:
    print(total)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))

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

    total = 1
    for a in A:
        total *= a

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

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))

for i in range(1, n+1):
    print(A.count(i))

Fixed submission:
import collections
n = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)

for i in range(1, n+1):
    print(c[i])
Buggy python submission (verdict: Time Limit Exceeded):
import math
a, b = map(int, input().split())
ans = math.ceil(a / 0.08)
while b != math.floor(ans*0.1):
    ans += 1

if math.floor(ans*0.08) == a:
    print(ans)
else:
    print(-1)

Fixed submission:
import math
a, b = map(int, input().split())
for i in range(1, 1010):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()
print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

ans = 0

for i in range(n):
    tmp = p[:i+1]
    if min(tmp) >= p[i]:
        ans += 1

print(ans)

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

ans = 1
tmp_min = p[0]

for i in range(1, n):
    if tmp_min >= p[i]:
        tmp_min = p[i]
        ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]

for i in range(0, len(s), 2):
    if not (s[i] in odd) and (s[i+1]):
        print("No")
        exit(0)

print("Yes")

Fixed submission:
s = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]

for i in range(len(s)):
    if i%2 == 0:
        if not s[i] in odd:
            print("No")
            exit(0)
    else:
        if not s[i] in even:
            print("No")
            exit(0)

print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
import collections
n = int(input())
s = [input() for _ in range(n)]
ans = 0
c = []
cnt = []

for i in range(n):
    tmp = collections.Counter(s[i])
    if tmp not in c:
        c.append(tmp)
    else:
        ans += cnt.count(tmp)
    cnt.append(tmp)

print(ans)

Fixed submission:
n = int(input())
S = [input() for _ in range(n)]
ans = 0
c = {}

for s in S:
    s = "".join(sorted(s))
    if s not in c.keys():
        c[s] = 1
    else:
        ans += c[s]
        c[s] += 1


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import collections
n = int(input())
S = [input() for _ in range(n)]
ans = 0
c = []

for s in S:
    c.append(collections.Counter(s))

for i in range(n-1):
    for j in range(i+1, n):
        if c[i] == c[j]:
            ans += 1

print(ans)

Fixed submission:
n = int(input())
S = [input() for _ in range(n)]
ans = 0
c = {}

for s in S:
    s = "".join(sorted(s))
    if s not in c.keys():
        c[s] = 1
    else:
        ans += c[s]
        c[s] += 1


print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = [int(input()) for _ in range(n)]

for i in range(n):
    tmp = A.copy()
    tmp.pop(i)
    print(max(tmp))

Fixed submission:
n = int(input())
A = [int(input()) for _ in range(n)]
f_num = max(A)
A_c = A.copy()
A_c.remove(f_num)
s_num = max(A_c)

for a in A:
    if a == f_num:
        print(s_num)
    else:
        print(f_num)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
d = list(map(int, input().split()))
d_max = max(d)
d_half = len(d) // 2
ans = 0

for i in range(1, d_max+1):
    abc = [x for x in d if x < i]
    if len(abc) == d_half:
        ans += 1

print(ans)

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

print(d[n//2] - d[n//2-1])
Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = list(map(int, input().split()))
c = 0
total = 0
for i in range(n+2):
    if total <= x:
        c += 1
        total += l[i]
    else:
        break

print(c)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))
ans = 0
d = []
d.append(0)
for i in range(n):
    d.append(d[i] + l[i])

for i in range(len(d)):
    if d[i] <= x:
        ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from math import gcd
#リスト l の最大公約数
def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
n = int(input())
A = list(map(int, input().split()))
ans = 0

for i in range(n):
    tmp = A.copy()
    del tmp[i]
    gcd_num = gcdlist(tmp)
    ans = max(ans, gcd_num)

print(ans)

Fixed submission:
from math import gcd
#リスト l の最大公約数
def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
n = int(input())
A = list(map(int, input().split()))
ans = 0

x = [0]*n
y = [0]*n
for i in range(1, n):
    x[i] = gcd(x[i-1], A[i-1])
for i in reversed(range(n-1)):
    y[i] = gcd(y[i+1], A[i+1])

for i in range(n):
    tmp = gcd(x[i], y[i])
    ans = max(ans, tmp)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from math import gcd
#リスト l の最大公約数
def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
n = int(input())
A = list(map(int, input().split()))
ans = 0

for i in range(n):
    tmp = A.copy()
    tmp.pop(i)
    gcd_num = gcdlist(tmp)
    ans = max(ans, gcd_num)

print(ans)

Fixed submission:
from math import gcd
#リスト l の最大公約数
def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
n = int(input())
A = list(map(int, input().split()))
ans = 0

x = [0]*n
y = [0]*n
for i in range(1, n):
    x[i] = gcd(x[i-1], A[i-1])
for i in reversed(range(n-1)):
    y[i] = gcd(y[i+1], A[i+1])

for i in range(n):
    tmp = gcd(x[i], y[i])
    ans = max(ans, tmp)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from math import gcd
#a,bの最大公約数
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)

#リスト l の最大公約数
def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
n = int(input())
A = list(map(int, input().split()))
ans = 0

for i in range(n):
    tmp = A.copy()
    tmp.pop(i)
    gcd_num = gcdlist(tmp)
    ans = max(ans, gcd_num)

print(ans)

Fixed submission:
from math import gcd
#リスト l の最大公約数
def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
n = int(input())
A = list(map(int, input().split()))
ans = 0

x = [0]*n
y = [0]*n
for i in range(1, n):
    x[i] = gcd(x[i-1], A[i-1])
for i in reversed(range(n-1)):
    y[i] = gcd(y[i+1], A[i+1])

for i in range(n):
    tmp = gcd(x[i], y[i])
    ans = max(ans, tmp)

print(ans)
Buggy python submission (verdict: Runtime Error):
time = []
for _ in range(5):
    time.append(int(input()))

mod = []
for i in time:
    mod.append(i % 10)

mod = [i for i in mod if i != 0]

for i in range(len(mod)):
    mod[i] = 10 - mod[i]

add = sum(mod) - max(mod)

print(sum(time) + add)

Fixed submission:
time = []
for _ in range(5):
    time.append(int(input()))

mod = []
for i in time:
    mod.append(i % 10)

mod = [i for i in mod if i != 0]

for i in range(len(mod)):
    mod[i] = 10 - mod[i]

if len(mod) == 0:
    add = 0
else:
    add = sum(mod) - max(mod)

print(sum(time) + add)
Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
s = input()
LR = [list(map(int, input().split())) for _ in range(q)]

for i in range(q):
    l, r = LR[i][0], LR[i][1]
    tmp = s[l-1:r]
    print(tmp.count(("AC")))


Fixed submission:
n, q = map(int, input().split())
s = input()
LR = [list(map(int, input().split())) for _ in range(q)]

t = [0]*(n+1)

for i in range(n):
    t[i+1] = t[i] + (1 if s[i:i+2]=="AC" else 0)

for i in LR:
    l, r = i[0], i[1]
    print(t[r-1] - t[l-1])
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
ans = 0

while True:
    ans += s.count("01")*2
    s = s.replace("01", "")
    ans += s.count("10")*2
    s = s.replace("10", "")
    if not (s.count("01") or s.count("10")):
        break

print(ans)

Fixed submission:
import collections
s = list(input())
c = collections.Counter(s)
print(min(c["0"], c["1"])*2)
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
l = list(range(A, B+1))
l_s = l[:K]
l_m = l[K*-1:]
ans = l_s + l_m
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)

Fixed submission:
A, B, K = map(int, input().split())
l = []
for i in range(K):
    if A+i <= B:
        l.append(A+i)
    if B-i >= A:
        l.append(B-i)

for i in sorted(set(l)):
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))
A_1 = list(map(lambda x: x-1, A))
A_2 = list(map(lambda x: x+1, A))

ans = 0
for x in set(A):
    cnt = A.count(x) + A_1.count(x) + A_2.count(x)
    ans = max(cnt, ans)
print(ans)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
c = [0]*100000
ans = 0
for a in A:
    c[a] += 1

for i in range(1, 99999):
    cnt = c[i-1] + c[i] +c[i+1]
    ans = max(ans, cnt)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))
A.sort()

ans = 0
for x in set(A):
    tmp = [a for a in A if x-1 <= a <= x+1]
    ans = max(ans, len(tmp))

print(ans)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
c = [0]*100000
ans = 0
for a in A:
    c[a] += 1

for i in range(1, 99999):
    cnt = c[i-1] + c[i] +c[i+1]
    ans = max(ans, cnt)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for _ in range(N)]

done_list = [1]
ans = 0
tmp = 1
for _ in range(N):
    if A[tmp-1] in done_list:
        print(-1)
        exit(0)
    done_list.append(A[tmp-1])
    tmp = A[tmp-1]
    ans += 1
    if tmp == 2:
        print(ans)
        exit(0)

Fixed submission:
N = int(input())
A = [0] + [int(input()) for _ in range(N)]

done = {}
ans = 0
now = A[1]
while True:
    ans += 1
    if now == 2:
        print(ans)
        exit(0)
    if done.get(now) == None:
        done[now] = True
        now = A[now]
    else:
        break
print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for _ in range(N)]

done_list = [1]
ans = 0
tmp = 1
for _ in range(N):
    if A[tmp-1] in done_list:
        print(-1)
        exit(0)
    done_list.append(A[tmp-1])
    tmp = A[tmp-1]
    ans += 1
    if tmp == 2:
        print(ans)
        exit(0)

Fixed submission:
N = int(input())
A = [0] + [int(input()) for _ in range(N)]

done = {}
ans = 0
now = A[1]
while True:
    ans += 1
    if now == 2:
        print(ans)
        exit(0)
    if done.get(now) == None:
        done[now] = True
        now = A[now]
    else:
        break
print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for _ in range(N)]

done_list = [1]
ans = 0
tmp = 1
while True:
    if A[tmp-1] in done_list:
        print(-1)
        exit(0)
    done_list.append(A[tmp-1])
    tmp = A[tmp-1]
    ans += 1
    if tmp == 2:
        print(ans)
        exit(0)

Fixed submission:
N = int(input())
A = [0] + [int(input()) for _ in range(N)]

done = {}
ans = 0
now = A[1]
while True:
    ans += 1
    if now == 2:
        print(ans)
        exit(0)
    if done.get(now) == None:
        done[now] = True
        now = A[now]
    else:
        break
print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x+y+z == s:
                ans += 1
                break

print(ans)

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

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x+y+z == s:
                ans += 1

print(ans)

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

print(ans)
Buggy python submission (verdict: Runtime Error):
x = int(input())
if x < 30:
  print("No")
 else:
  print("Yes")

Fixed submission:
x = int(input())
if x<30:
    print("No")
else:
    print("Yes")
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(a, b):
	while b:
		a, b = b, a % b
	return a

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

print(lcm(a, b))
Buggy python submission (verdict: Runtime Error):
n = int(input())

ans = -1
for x in range(n):
    if int(x*1.08)==n:
        ans = x

if ans != -1:
    print(ans)
else:
    print(':(')

Fixed submission:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 != m2 and d2 == 1:
    print(1)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
s = input()
week = { 'SUN': 7, 'MUN': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1 }
print(week[s])

Fixed submission:
week = { 'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1 }
print(week[input()])

Buggy python submission (verdict: Runtime Error):
week = {'SUN':7, 'MUN':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1}
print(week[str(input())])

Fixed submission:
week = { 'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1 }
print(week[input()])

Buggy python submission (verdict: Runtime Error):
choise = input()
week = {'SUN':7, 'MUN':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1}
print(week[choise])

Fixed submission:
week = { 'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1 }
print(week[input()])

Buggy python submission (verdict: Runtime Error):
week = {'SUN':7, 'MUN':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1}
print(week[input()])

Fixed submission:
week = { 'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1 }
print(week[input()])
Buggy python submission (verdict: Runtime Error):
a = int(input()) 
b = int(input()) 
c = int(input()) 
d = int(input()) 
print(sum(min(a,b)+min(c,d)))

Fixed submission:
a = int(input()) 
b = int(input()) 
c = int(input()) 
d = int(input()) 
print((min(a,b)+min(c,d)))

Buggy python submission (verdict: Runtime Error):
a = int(input()) 
b = int(input()) 
c = int(input()) 
d = int(input()) 
print(sun(min(a,b)+min(c,d)))

Fixed submission:
a = int(input()) 
b = int(input()) 
c = int(input()) 
d = int(input()) 
print((min(a,b)+min(c,d)))
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
A = list(map(int, input().split()))

for i in range(n):
    if i + k >= n:
        exit()
    a = A[i:i+k]
    pre = a[0]
    aft = A[i+k]
    if pre >= aft:
        print('No')
    else:
        print('Yes')



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

for i in range(n):
    if i + k >= n:
        exit()
    pre = A[i]
    aft = A[i+k]
    if pre >= aft:
        print('No')
    else:
        print('Yes')