Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

ans = INF
for i in range(N-1):
    x = sum(A[:i+1])
    y = sum(A[i+1:])

    tmp = abs(x - y)
    if tmp < ans:
        ans = tmp
print(ans)


Fixed submission:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

if N == 2:
    print(abs(A[0] - A[1]))
else:
    ans = INF

    x = A[0]
    y = sum(A[1:])

    for i in range(1, N-2):
        x = x + A[i]
        y = y - A[i]

        tmp = abs(x - y)
        if tmp < ans:
            ans = tmp
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


K = int(input())
sum = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            sum += gcd(i, j, k)
print(sum)

Fixed submission:
import math


K = int(input())
sum = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        i_j = math.gcd(i, j)
        for k in range(1, K+1):
            sum += math.gcd(i_j, k)
print(sum)
Buggy python submission (verdict: Runtime Error):
a = input()
s=0
s = int(a)
s = list(map(int, a))


if int(a)%9==0 or s%9==0:
    print('Yes')
else:
    print('No')




Fixed submission:
a = input()
s = int(a)
s = list(map(int, a))
b=int(a)


if b%9==0 or sum(s)%9==0:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Time Limit Exceeded):
a = input()
s=0
s = int(a)
for i in range(len(a)):
    s=s+int(a[i])


if int(a)%9==0:
    print('Yes')
elif s%9==0:
    print('Yes')
else:
    print('No')


Fixed submission:
a = input()
s = int(a)
s = list(map(int, a))
b=int(a)


if b%9==0 or sum(s)%9==0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
count = 0
before = 0
if k%2 == 0 or k%5==0:
    print(-1)
    exit()

ai=0
i=0
while True:
    ai = (ai*10+7)%k
    i += 1
    if ai == 0:
        print(i)
        break

Fixed submission:
k = int(input())
count = 0
before = 0
if k % 2 == 0 or k % 5 == 0:
    print(-1)
    exit()

ai = 0
i = 0
while True:
    ai = (ai*10+7) % k
    i += 1
    if ai == 0:
        print(i)
        break

Buggy python submission (verdict: Time Limit Exceeded):
import math
k = int(input())
count = 0
before = 0

while True:
    if k % 2 == 0:
        print(-1)
        break
    seven = 10**count*7 + before
    #print(seven)
    if seven%k == 0:
        print(count+1)
        break
    else:
        before = seven
        count +=1
        #print(count)


Fixed submission:
k = int(input())
count = 0
before = 0
if k % 2 == 0 or k % 5 == 0:
    print(-1)
    exit()

ai = 0
i = 0
while True:
    ai = (ai*10+7) % k
    i += 1
    if ai == 0:
        print(i)
        break
Buggy python submission (verdict: Runtime Error):
def main():
    n,m,k = input().split()
    n=int(n)
    m=int(m)
    k=int(k)

    n_list = list(map(int,input().split()))
    m_list = list(map(int,input().split()))
    a, b =[0],[0]
    for i in range(n):
        a.append(a[i]+n_list[i])
    for j in range(m):
        b.append(b[j]+m_list[j])
    
    j=m
    ans = 0
    for i in range(n+1):
        if a[i]>k:
            break
        while b[j]+a[i]>k:
            j -= 1
        ans = max(ans,i+j)
    print(ans)
main()

Fixed submission:
def main():
    a = int(input())
    print(a+a**2+a**3)

main()
Buggy python submission (verdict: Runtime Error):
n = int(input())
list_in = list(map(int, input().split()))
q = int(input())
for i in range(q):
    bc = list(map(int, input().split()))
    for j in range(n):
        if list_in[j] == bc[0]:
            list_in[j] = bc[1]
    print(sum(list_in))

Fixed submission:
in_str = input()
if in_str.isupper() == True:
    print("A")
else:
    print("a")
Buggy python submission (verdict: Runtime Error):
x,y = int(input().split())
 
if x*4>y and y<x*2 and y%2 == 0:
  print("Yes")
else:
  print("No")

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

Buggy python submission (verdict: Runtime Error):
C

Fixed submission:
in_list = list(map(int, input().split()))
for i in range(5):
  if in_list[i] ==0:
    print(i+1)
Buggy python submission (verdict: Runtime Error):
x,y = int(input().split())
 
if x*4>y and y<x*2 and y%2 == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
x,y = input().split()
 
x=int(x)
y=int(y)
count = 0
for i in range(x+1):
  if 2*i+4*(x-i) == y:
    print("Yes")
    count = 1

if count == 0:
	print("No")

Buggy python submission (verdict: Runtime Error):
x,y = input().split()

if x*4>y and y<x*2 and y%2 == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
x,y = input().split()
 
x=int(x)
y=int(y)
count = 0
for i in range(x+1):
  if 2*i+4*(x-i) == y:
    print("Yes")
    count = 1

if count == 0:
	print("No")

Buggy python submission (verdict: Runtime Error):
x,y = input().split()

if x*4>y and y%2 == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
x,y = input().split()
 
x=int(x)
y=int(y)
count = 0
for i in range(x+1):
  if 2*i+4*(x-i) == y:
    print("Yes")
    count = 1

if count == 0:
	print("No")

Buggy python submission (verdict: Runtime Error):
x,y = input().split()

if x*4>y and y%2 ==0:
  print("Yes")
else:
  print("No")

Fixed submission:
x,y = input().split()
 
x=int(x)
y=int(y)
count = 0
for i in range(x+1):
  if 2*i+4*(x-i) == y:
    print("Yes")
    count = 1

if count == 0:
	print("No")

Buggy python submission (verdict: Runtime Error):
x,y = input().split()

if x*4<y and y%2 ==0:
  print("Yes")
else:
  print("No")

Fixed submission:
x,y = input().split()
 
x=int(x)
y=int(y)
count = 0
for i in range(x+1):
  if 2*i+4*(x-i) == y:
    print("Yes")
    count = 1

if count == 0:
	print("No")

Buggy python submission (verdict: Runtime Error):
x,y = input().split()

if x*4<y and y%2 ==0:
  print("Yes")
else:
  print"No")

Fixed submission:
x,y = input().split()
 
x=int(x)
y=int(y)
count = 0
for i in range(x+1):
  if 2*i+4*(x-i) == y:
    print("Yes")
    count = 1

if count == 0:
	print("No")
Buggy python submission (verdict: Runtime Error):
a,b= input().split()
print(a*b)

Fixed submission:
a,b= input().split()
print(int(a)*int(b))
Buggy python submission (verdict: Runtime Error):
import math

def main():
    a,b = input().split()
    result = int(a)*int(b*100)
    print(int(math.floor(result/100)))

main()

Fixed submission:
def main():
    a,b = input().split()
    a = int(a)
    b = round(100*float(b))
    result = a*b//100
    print(result)

main()
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))

for i in range(100):
    if max_num < a[i]:
        max_num = a[i]
    elif min_num > a[i]:
        min_num =a[i]

print(max_num-min_num)

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

print(max(a)-min(a))
Buggy python submission (verdict: Runtime Error):
in = str(input())
s0 = int(in[0])
s1 = int(in[1])
s2 = int(in[2])

print(s0+s1+s2)

Fixed submission:
in_s = str(input())
s0 = int(in_s[0])
s1 = int(in_s[1])
s2 = int(in_s[2])
 
print(s0+s1+s2)
Buggy python submission (verdict: Runtime Error):
s = input()
print(s[:1]+str(len(s-2))+s[-1:])

Fixed submission:
s = input()
print(s[:1]+str(len(s)-2)+s[-1:])
Buggy python submission (verdict: Time Limit Exceeded):
import sys

n = int(input())
ans = 0
while n>0:
    ans += n%10
    n = n//10
    
#print(ans)

if ans%9 == 0:
    print("Yes")
else:
    print("No")




Fixed submission:
def digitSum(n):
    # 数値を文字列に変換
    s = str(n)
    # １文字ずつ数値化し配列にする。
    array = list(map(int, s))
    # 合計値を返す
    return sum(array)

n = int(input())
ans = digitSum(n)
#print(ans)

if ans%9 == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
while True:
	c-=b
	if c<=0:
		print("Yes")
		break
	a-=d
	if a<=0:
		print("No")
		break


Fixed submission:
N = int(input())
S = list()
for i in range(N):
  S.append(input())
S1 = set(S)
print(len(S1))

Buggy python submission (verdict: Runtime Error):
#include "bits/stdc++.h"
using namespace std;

int main(){
    int N;
    cin >> N;
    string S[N];
    for(int i=0;i<N;i++) cin >> S[i];
    int count = 0;
    for(int i=0;i<N;i++){
        if(S[i]!="0"){
            for(int j=i+1;j<N;j++){
                if(S[i]==S[j]) S[j]="0";
            }
        }
    }
    for(int i=0;i<N;i++){
        if(S[i]!="0") count++;
    }
    cout << count << endl;

}


Fixed submission:
N = int(input())
S = list()
for i in range(N):
  S.append(input())
S1 = set(S)
print(len(S1))

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

n = int(input())

list1 = []

for i in range (n):
    s = input()
    if s not in list1:
        list1.append(s)

ans = len(list1)
print(ans)

Fixed submission:
N = int(input())
S = list()
for i in range(N):
  S.append(input())
S1 = set(S)
print(len(S1))
Buggy python submission (verdict: Runtime Error):
import sys

N = input()
S = input()

c = 0

for i in range(N-2):
    if S[i]=='A' and  S[i+1]=='B'and  S[i+2]=='C':
        c += 1

print(c)

Fixed submission:
import sys

N = int(input())
S = input()

c = 0

for i in range(N-2):
    if S[i]=='A' and  S[i+1]=='B'and  S[i+2]=='C':
        c += 1

print(c)
Buggy python submission (verdict: Runtime Error):
#C
N=int(input())
alp=list(a)
Name=[]
for i in reversed(range(11)):
    if N/(26**i) >=1:
        alp_index=N//(26**i)-1 if N//(26**(i-1))!=26 else 25
        Name.append(alp[alp_index])
    N=N%(26**i)
print(''.join(Name))

Fixed submission:
#A
x = input()
if x.isupper() ==True:
    print('A')
else:
    print('a')
Buggy python submission (verdict: Runtime Error):
#D
from sys import stdin
def main():
    readline=stdin.readline
    n = int(readline())
    a = list(map(int,readline().split()))
    count=0
    for i in a:
        num_div=0
        for j in a:
            if i%j==0:
                num_div+=1
        if num_div==1:
            count+=1
    print(count)
main()

Fixed submission:
#A
x=list(map(int,input().split()))
for i in range(len(x)):
    if x[i] ==0:
        print(i+1)
Buggy python submission (verdict: Time Limit Exceeded):
#B
N = int(input())
A = list(sorted(map(int,input().split())))
ans=1
if A[0]==0:
  print(0)
else:
  for i in A:
    ans*=i
  if ans > 10**18:
    print(-1)
  else:
    print(ans)

Fixed submission:
#B
N = int(input())
A = list(sorted(map(int,input().split())))
ans=1
if A[0]==0:
    print(0)
else:
    for i in A:
        ans*=i
        if ans > 10**18:
            ans =-1
            break
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#B
N = int(input())
A = list(sorted(map(int,input().split())))
ans=1
for i in A:
    ans*=i
if ans > 10**18:
    print(-1)
else:
    print(ans)

Fixed submission:
#B
N = int(input())
A = list(sorted(map(int,input().split())))
ans=1
if A[0]==0:
    print(0)
else:
    for i in A:
        ans*=i
        if ans > 10**18:
            ans =-1
            break
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#B
N = int(input())
A = list(map(int,input().split()))
ans=1
for i in A:
    ans*=i
if ans > 10**18:
    print(-1)
else:
    print(ans)

Fixed submission:
#B
N = int(input())
A = list(sorted(map(int,input().split())))
ans=1
if A[0]==0:
    print(0)
else:
    for i in A:
        ans*=i
        if ans > 10**18:
            ans =-1
            break
    print(ans)
Buggy python submission (verdict: Runtime Error):
import math
theta_S=30*H+(1/10)*M
theta_L=6*M
S_x=A*math.sin(math.radians(theta_S))
S_y=A*math.cos(math.radians(theta_S))
L_x=B*math.sin(math.radians(theta_L))
L_y=B*math.cos(math.radians(theta_L))
distance=((S_x-L_x)**2+(S_y-L_y)**2)**0.5
print(distance)

Fixed submission:
#C
A, B, H, M= map(int,input().split())
import math
theta_S=-(30*H+(1/2)*M)+90
theta_L=-(6*M)+90
S_x=A*math.cos(math.radians(theta_S))
S_y=A*math.sin(math.radians(theta_S))
L_x=B*math.cos(math.radians(theta_L))
L_y=B*math.sin(math.radians(theta_L))
distance=((S_x-L_x)**2+(S_y-L_y)**2)**0.5
print(distance)
Buggy python submission (verdict: Time Limit Exceeded):
S=input()
Q=int(input())
Q=[input().split() for i in range(Q)]
 
for i in Q:
    if i[0]=='1':
        S=S[::-1]
    else:
        if i[1]=='1':
            S=i[2]+S
        else:
            S=S+i[2]
print(S)

Fixed submission:
S=input()
Q=int(input())
Q=[input().split() for i in range(Q)]
Forward=[]
Backward=[]
count=0
for i in Q:
    if i[0]=='1':
        count+=1
    else:
        if (int(i[1])+count)%2==1:
            Forward.append(i[2])
        else:
            Backward.append(i[2])  
if count%2==0:
    ans = (''.join(Forward))[::-1]+S+(''.join(Backward))
else:
    ans = (''.join(Backward)[::-1]+S[::-1]+(''.join(Forward)))
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
S=input()
Q=int(input())
Q=[input().split() for i in range(Q)]

for i in Q:
    if i[0]=='1':
        S=S[::-1]
    else:
        if i[1]=='1':
            S=i[2]+S
        else:
            S=S+i[2]
print(S)

Fixed submission:
S=input()
Q=int(input())
Q=[input().split() for i in range(Q)]
Forward=[]
Backward=[]
count=0
for i in Q:
    if i[0]=='1':
        count+=1
    else:
        if (int(i[1])+count)%2==1:
            Forward.append(i[2])
        else:
            Backward.append(i[2])  
if count%2==0:
    ans = (''.join(Forward))[::-1]+S+(''.join(Backward))
else:
    ans = (''.join(Backward)[::-1]+S[::-1]+(''.join(Forward)))
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))

a.sort(reverse=True)

count = 0
if N % 2 == 0:
  for i in range(int(N/2)):
    count += 2 * a[i]
    count -= a[0]
else:
  for i in range(int(N+1)/2):
    count += 2 * a[i]
    count -= a[0]
    count -= a[(N-1)/2]
    
print(count)

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

a.sort(reverse=True)

count = 0
if N % 2 == 0:
  for i in range(int(N/2)):
    count += 2 * a[i]
  count -= a[0]
else:
  for i in range(int((N+1)/2)):
    count += 2 * a[i]
  count -= a[0]
  count -= a[int((N-1)/2)]
    
print(count)
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()

count = 0
for (s,t) in map(S,T):
  if s != t:
    count += 1
print(count)

Fixed submission:
S = input()
T = input()
 
count = 0
for (s,t) in zip(S,T):
  if s != t:
    count += 1
    
print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = 0

for i in range(1, N+1):
  Y = N // j
  ans += Y * (Y+1) * j / 2
  
print(int(ans))

Fixed submission:
N = int(input())
ans = 0
 
for i in range(1, N+1):
  Y = N // i
  ans += Y * (Y+1) * i / 2
  
print(int(ans))

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

N = int(input())
ans = 0
print(int(sum([math.floor(N / (i+1)) * (math.floor(N / (i+1)) + 1) * (i+1) / 2  for i in range(N)])))


Fixed submission:
N = int(input())
ans = 0
 
for i in range(1, N+1):
  Y = N // i
  ans += Y * (Y+1) * i / 2
  
print(int(ans))

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

N = int(input())
ans = 0

for i in range(N):
  j = i + 1
  Y = math.floor(N / j)
  ans += Y * (Y+1) * j / 2
  
print(int(ans))
  


Fixed submission:
N = int(input())
ans = 0
 
for i in range(1, N+1):
  Y = N // i
  ans += Y * (Y+1) * i / 2
  
print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
import math
  
def divisors(n):
  count = 0
  i = 1
  max = math.sqrt(n)
  while i <= max:
    if n % i == 0 and i < max:
      count += 2
    elif n % i == 0 and i == max:
      count += 1
    i += 1
  return count

N = int(input())
ans = 0

for i in range(N):
  j = i+1
  ans += j * divisors(j)
  
print(ans)
  


Fixed submission:
N = int(input())
ans = 0
 
for i in range(1, N+1):
  Y = N // i
  ans += Y * (Y+1) * i / 2
  
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N = int(input())
A = list(map(int, input().split()))
Q = int(input())
P = [list(map(int,input().split())) for i in range(Q)]

A = np.array(A)

for item in P:
  np.place(A, A == item[0], item[1])
  print(np.sum(A))


Fixed submission:
import numpy as np
import collections

N = int(input())
A = list(map(int, input().split()))
Q = int(input())
P = [list(map(int,input().split())) for i in range(Q)]
A = np.array(A)

sum_A = np.sum(A)
c = collections.Counter(A)
  
for item in P:
  if item[0] in c.keys():
    sum_A += ((item[1] - item[0]) * c[item[0]])
    if item[1] in c.keys():
      c[item[1]] += c[item[0]]
    else:
      c[item[1]] = c[item[0]]
    c.pop(item[0])
  print(sum_A)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(map(int, input().split()))
ans = 1
for i in range(n):
    if s[i] == 0:
        print("0")
        exit()
    ans *= s[i]
if ans > 10**18:
        print("-1")
else: print(ans)

Fixed submission:
n = int(input())
s = list(map(int, input().split()))
ans = 1
if 0 in s:
    print("0")
    exit()
for i in range(n):
    ans *= s[i]
    if ans > 10**18:
        print("-1")
        exit()
print(ans)
Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
A =[0]
B=list(map(int, input().split()))
for m in range(N):
    A.append(B[m])
place=set([])
p=[]
i=1
count=0
while i not in place:
    place.add(i)
    p.append(i)
    i=A[i]
    count+=1
if count>=K:
    print(place[K+1])
else:
    loop=[i]
    start=i
    j=A[i]
    count+=1
    while j!=start:
        loop.append(j)
        j=A[j]
        count+=1
    num=(K-count)%len(loop)
    print(loop[num])

Fixed submission:
S=input()
T=input()
if S==T[:len(T)-1]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import sys
K = int(sys.stdin.readline())
A, B = map(int,sys.stdin.readline().split() )
for i in range(A,B+1):
    if i%K==0:
        return "OK"
    return "NG"

Fixed submission:
K=int(input())
A,B = map(int, input().split())
count=0
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        count+=1
        break
if count==0:
    print("NG")

Buggy python submission (verdict: Runtime Error):
K = int(sys.stdin.readline())
A, B = map(int,sys.stdin.readline().split() )
for i in range(A,B+1):
    if i%K==0:
        return "OK"
    return "NG"

Fixed submission:
K=int(input())
A,B = map(int, input().split())
count=0
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        count+=1
        break
if count==0:
    print("NG")

Buggy python submission (verdict: Runtime Error):
K = int(sys.stdin.readline())
A, B = map(int, input().split())
for i in range(A,B+1):
    if i%K==0:
        return "OK"
    return "NG"

Fixed submission:
K=int(input())
A,B = map(int, input().split())
count=0
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        count+=1
        break
if count==0:
    print("NG")

Buggy python submission (verdict: Runtime Error):
K=int(input())
A, B = map(int, input().split())
for i in range(A,B+1):
    if i%K==0:
        return "OK"
    return "NG"

Fixed submission:
K=int(input())
A,B = map(int, input().split())
count=0
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        count+=1
        break
if count==0:
    print("NG")

Buggy python submission (verdict: Runtime Error):
K=int(input())
inp=input().split(' ')
A=int(inp[0])
B=int(inp[1])
for i in range(A,B+1):
    if i%K==0:
        return "Yes"
    return "No"

Fixed submission:
K=int(input())
A,B = map(int, input().split())
count=0
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        count+=1
        break
if count==0:
    print("NG")
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=[]
for i in range(N):
    a=input()
    if a  not in S:
        S.append(a)
print(len(S))

Fixed submission:
N=int(input())
S=[]
for i in range(N):
    a=input()
    S.append(a)
b=list(set(S))
print(len(b))

Buggy python submission (verdict: Runtime Error):
N=int(input())
S=[]
for i in range(N):
    if input() not in S:
        S.append(input())
print(len(S))

Fixed submission:
N=int(input())
S=[]
for i in range(N):
    a=input()
    S.append(a)
b=list(set(S))
print(len(b))
Buggy python submission (verdict: Runtime Error):
N=list(map(int,input(),split()))
if sorted(N)==[5,7,7]:
    print("YES")
else:
    print("NO")

Fixed submission:
N=list(map(int,input().split()))
if sorted(N)==[5,5,7]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
N=list(map(int.input(),split()))
if sorted(N)==[5,7,7]:
    print("YES")
else:
    print("NO")

Fixed submission:
N=list(map(int,input().split()))
if sorted(N)==[5,5,7]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split()))
for i in range(len(x)):
	if x[i] == 0:
      print(i+1)

Fixed submission:
x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] == 0:
    print(i+1)
Buggy python submission (verdict: Runtime Error):
X,N = map(int,input().split())
n = list(map(int,input().split()))
xn = list(range(1,101))
for i in range(N):
  xn.remove(n[i])
mindis = 100
for i in range(len(xn)):
  dis = abs(X-xn[i])
  if dis < mindis:
    mindis = dis
    answer = xn[i]
print(answer)

Fixed submission:
X,N = map(int,input().split())
n = list(map(int,input().split()))
xn = list(range(0,102))
answer = 0
for i in range(N):
  xn.remove(n[i])
mindis = 100
for i in range(len(xn)):
  dis = abs(X-xn[i])
  if dis < mindis:
    mindis = dis
    answer = xn[i]
print(answer)

Buggy python submission (verdict: Runtime Error):
X,N = map(int,input().split())
n = list(map(int,input().split()))
xn = list(range(1,101))
for i in range(N):
  xn.remove(n[i])
n
mindis = 100
for i in range(100-len(n)):
  dis = abs(X-xn[i])
  if dis < mindis:
    mindis = dis
    answer = xn[i]
print(answer)

Fixed submission:
X,N = map(int,input().split())
n = list(map(int,input().split()))
xn = list(range(0,102))
answer = 0
for i in range(N):
  xn.remove(n[i])
mindis = 100
for i in range(len(xn)):
  dis = abs(X-xn[i])
  if dis < mindis:
    mindis = dis
    answer = xn[i]
print(answer)