TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int, input().split())
plist = list(map(int, input().split()))

list = []

a = x
while True:
    if not a in plist:
        list.append(a)
        break
    a += 1

b = x-1
while True:
    if not b in plist:
        list.append(b)
        break
    b -= 1

print(min(list))


x, n = map(int, input().split())
plist = list(map(int, input().split()))

a = x
while True:
    if not a in plist:
        big = a
        break
    a += 1

b = x-1
while True:
    if not b in plist:
        small = b
        break
    b -= 1

if abs(big-x) < abs(small-x):
    ans = big
else:
    ans = small

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
X,N = map(int,input().split())
if N > 0:
    A = list(map(int,input()))
    for i in range(100):
        x = X - i
        y = X - i
    if x not in A:
        print(x)
        quit()
    if y not in A:
        print(y)
        quit()
else:
    print(N)


X,N = map(int,input())
if N > 0:
    A = list(map(int,input()))
    for i in range(100):
        x = X - i
        y = X - i
    if x not in A:
        print(x)
        quit()
    if y not in A:
        print(y)
        quit()
else:
    print(N)

X,N = map(int,input().split())
if N > 0:
    A = list(map(int,input().split()))
    d = {}
    for i in range(102):
        d[i] = 0
    for a in A:
        d[a] = 1
    for i in range(0,100):
        x = X - i
        y = X + i
        if d[x] == 0:
            print(x)
            quit()
        if d[y] == 0:
            print(y)
            quit()
else:
    print(X)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
import numpy as np
#from numba import njit

def getVar():
    return map(int, input().split())
def getArray():
    return np.array(list(map(int, input().split())))

(X,N) = getVar()
p = getArray()

if (len(p) == 0):
  print(X)
else:
  subp = p - X
  i = 0
  while (True):
    if (not i in subp):
      break
  print(X - i)

import numpy as np
#from numba import njit

def getVar():
    return map(int, input().split())
def getArray():
    return np.array(list(map(int, input().split())))

(X,N) = getVar()
p = getArray()

if (len(p) == 0):
  print(X)
else:
  subp = p - X
  i = 0
  while (True):
    if (not i in subp):
      break
    i += 1
  print(X - i)

import numpy as np
#from numba import njit

def getVar():
    return map(int, input().split())
def getArray():
    return np.array(list(map(int, input().split())))

(X,N) = getVar()
p = getArray()

if (len(p) == 0):
  print(X)
else:
  subp = p - X
  i = 0
  while (True):
    if (not -i in subp):
      print(X - i)
      break
    if (not i in subp):
      print(X + i)
      break
    i += 1

Verdicts: Time Limit Exceeded

Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x , n = map(int,input().split())
p_str = input().split()
list = []
for i in p_str :
    p = int(i)
    list.append(p)

if not x  in list :
    print(x)
else :
    for i  in range(101):
        y = x - i
        if not y in list :
            print(y)
            break
            z = x + i
        if not z in list :
            print(z)
            break


x , n = map(int,input().split())
p_str = []
if n != 0 :
    p_str = input().split()
    
list = []

for i in p_str :
    p = int(i)
    list.append(p)

if not x  in list :
    print(x)
else :
    for i  in range(101):
        y = x - i
        if not y in list :
            print(y)
            break
        z = x + i
        if not z in list :
            print(z)
            break

Verdicts: Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
X , N = map(int, input().split())
p = list(map(int,input().split()))
ans = []
if N == 0:
    print(X)
elif X not in  p:
    print(X)
else:
    p = sorted(p)
    p2 = [abs(i-X) for i in p]

    for i in range(p[p2.index(min(p2))],101):
        if i not in p:
            ans.append(i)
            break
    for i in range(p[p2.index(min(p2))], -100, -1):
        if i not in p:
            ans.append(i)
            break
    
    ans = sorted(ans)
    ans2 = [abs(i-X) for i in ans]
    
    print(min(ans))
   # print(ans[ans2.index(min(ans2))])
   # print(min(ans))

X , N = map(int, input().split())
p = list(map(int,input().split()))
ans = []
if N == 0:
    print(X)
elif X not in  p:
    print(X)
else:
    p = sorted(p)
    p2 = [abs(i-X) for i in p]

    for i in range(p[p2.index(min(p2))],101):
        if i not in p:
            ans.append(i)
            break
    for i in range(p[p2.index(min(p2))], -1, -1):
        if i not in p:
            ans.append(i)
            break
    
    ans = sorted(ans)
    ans2 = [abs(i-X) for i in ans]
    ans2 = sorted(ans2)
    print(ans[ans2.index(min(ans2))])
   # print(min(ans))


X , N = map(int, input().split())
p = list(map(int,input().split()))
ans = []
if N == 0:
    print(X)
elif X not in  p:
    print(X)
else:
    p = sorted(p)
    p2 = [abs(i-X) for i in p]

    for i in range(p[p2.index(min(p2))],102):
        if i not in p:
            ans.append(i)
            break
    for i in range(p[p2.index(min(p2))], -1, -1):
        if i not in p:
            ans.append(i)
            break
    
    ans = sorted(ans)
    ans2 = [abs(i-X) for i in ans]
    ans2 = sorted(ans2)
    print(ans[ans2.index(min(ans2))])
   # print(min(ans))


X , N = map(int, input().split())
p = list(map(int,input().split()))
ans = []
if N == 0:
    print(X)
elif X not in  p:
    print(X)
else:
    p = sorted(p)
    p2 = [abs(i-X) for i in p]

    for i in range(p[p2.index(min(p2))],102):
        if i not in p:
            ans.append(i)
            break
    for i in range(p[p2.index(min(p2))], -100, -1):
        if i not in p:
            ans.append(i)
            break
    
    ans = sorted(ans)
    ans2 = [abs(i-X) for i in ans]
    print(ans[ans2.index(min(ans2))])


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n, *p = map(int, open(0).read().split())
ans1 = x
while ans1 in p:
    ans1 += 1
ans2 = x
while ans2 in p:
    ans2 -= 1

print(min(ans1,ans2))

x, n, *p = map(int, open(0).read().split())
ans1 = x
while ans1 in p:
    ans1 += 1
ans2 = x
while ans2 in p:
    ans2 -= 1

if abs(ans2-x) < abs(ans1-x):
    print(ans2)
elif abs(ans2-x) > abs(ans1 - x):
    print(ans1)
else:
    print(min(ans1,ans2))

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
X, N = list(map(int, input().split()))
if N!=0:
    P = set(list(map(int, input().split())))
else:
    print(X)
    exit(0)

dist = 100
r = None
for i in range(100, -1, -1):
    if not i in P and abs(X-i) <= dist:
        dist = abs(X-i)
        print (i, dist)
        r = i

print(r)


X, N = list(map(int, input().split()))
if N!=0:
    P = set(list(map(int, input().split())))
else:
    print(X)
    exit(0)

dist = 100
r = None
for i in range(105, -1, -1):
    if not i in P and abs(X-i) <= dist:
        dist = abs(X-i)
        r = i

print(r)


Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
X, N = [int(x) for x in input().split()]
array = [int(x) for x in input().split()]
plus = X
minus = X
if N == 0:
    print(X)
    exit()
while True:
    plus += 1
    minus -= 1
    print(plus)
    print(minus)
    if minus not in array:
        print(minus)
        exit()
    if plus not in array:
        print(plus)
        exit()




X, N = [int(x) for x in input().split()]
array = [int(x) for x in input().split()]
plus = X
minus = X
if N == 0:
    print(N)
    exit()
while True:
    plus += 1
    minus -= 1
    print(plus)
    print(minus)
    if minus not in array:
        print(minus)
        exit()
    if plus not in array:
        print(plus)
        exit()




X, N = [int(x) for x in input().split()]
array = [int(x) for x in input().split()]
plus = X
minus = X
if N == 0:
    print(X)
    exit()
while True:
    plus += 1
    minus -= 1

    print(minus)
    if minus not in array:
        print(minus)
        exit()
    if plus not in array:
        print(plus)
        exit()




X, N = [int(x) for x in input().split()]

def main(X, N):
    if N == 0:
        return X
    arrp = [int(x) for x in input().split()]
    minus = X
    plus = X
    while True:
        if minus not in arrp:
            print(minus)
            exit()
        if plus not in arrp:
            print(plus)
            exit()
        minus -= 1
        plus += 1

print(main(X, N))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
    x, n = map(int, input().split())
    p = list(map(int, input().split()))
    ans = 9999999999
    lists = []
    if n == 0:
        print(x)
        exit()
    for i in range(-1000, 1000):
        if not i in p:
            lists.append(i)
    for i in lists:
        if ans > abs(x - i):
            ans = abs(x-i)
            m = i
     
    print(m)

x, n = map(int, input().split())
p = list(map(int, input().split()))
ans = 9999999999
lists = []
if n == 0:
    print(x)
    exit()
for i in range(-1000, 1000):
    if not i in p:
        lists.append(i)
for i in lists:
    if ans > abs(x - i):
        ans = abs(x-i)
        m = i
print(m)

Verdicts: Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int, input().split())
p = list(map(int, input().split()))

if n == 0:
    ans = x

d = float('inf')

for i in range(n+1):
    tmpx = x + 1 + n//2 - i
    if not tmpx in p:
        tmpd = abs(x -tmpx) 
        if d >= tmpd:
            d = tmpd
            if ans >= tmpx:
                ans = tmpx

print(ans)




x, n = map(int, input().split())
p = list(map(int, input().split()))

if n == 0:
    ans = x

d = float('inf')

for i in range(n+1):
    tmpx = x + 1 + n//2 - i
    if not tmpx in p:
        tmpd = abs(x -tmpx) 
        if d >= tmpd:
            d = tmpd
            if ans >= tmpx:
                ans = tmpx

print(ans)




x, n = map(int, input().split())
p = list(map(int, input().split()))

if n == 0:
    ans = x

d = float('inf')

for i in range(n+1):
    tmpx = x + 1 + n//2 - i
    if not tmpx in p:
        tmpd = abs(x -tmpx) 
        if d >= tmpd:
            d = tmpd
            if ans > tmpx
                ans = tmpx

print(ans)




x, n = map(int, input().split())
p = list(map(int, input().split()))

if n == 0:
    ans = x
else:
    ans = float('inf')

d = float('inf')

for i in range(n+2):
    tmpx = x + 1 + n//2 - i
    if not tmpx in p:
        tmpd = abs(x -tmpx) 
        if d >= tmpd:
            d = tmpd
            if ans >= tmpx:
                ans = tmpx

print(ans)




Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
import sys
x,n=map(int,input().split())
if n==0:
    print(x)
    sys.exit()
else:
    p=list(map(int,input().split()))
    res=1000
    ans=0
    for i in range(1,101):
        p.append(i)
        if len(p)==len(set(p)):
            if res>=abs(x-i):
                res=abs(x-i)
                ans=i
        del p[-1]
    for i in range(n):
        if x+(x-ans)!=p[i]:
            print(x+(x-ans))
            sys.exit()
    print(ans)

import sys
x,n=map(int,input().split())
if n==0:
    print(x)
    sys.exit()
else:
    p=list(map(int,input().split()))
    res=1000
    for i in range(1,101):
        p.append(i)
        if len(p)==len(set(p)):
            if res>=abs(x-i):
                res=abs(x-i)
                ans=i
        del p[-1]
    for i in range(n):
        if x+(x-ans)!=p[i]:
            print(x+(x-ans))
            sys.exit()
    print(ans)

import sys
x,n=map(int,input().split())
if n==0:
    print(x)
    sys.exit()
else:
    p=list(map(int,input().split()))
    res=1000
    ans=0
    for i in range(101,-101,-1):
        p.append(i)
        if len(p)==len(set(p)):
            if res>=abs(x-i):
                res=abs(x-i)
                ans=i
        del p[-1]
    print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
import numpy as np

a = input()
a, b = a.split()
a = int(a)
if int(b) == 0:
  print(a)
  exit()
n = input()
n = [int(i) for i in n.split()]
li = list(range(-101, 101))
print(li)
for i in n:
  li.remove(i)
mini = [np.inf, 0]
for i in li:
  if abs(i - a) == mini[0]:
    if i < mini[1]:
      mini = [abs(i - a), i]
  elif abs(i - a) < mini[0]:
    mini = [abs(i - a), i]
print(mini[1])

import numpy as np

a = input()
a, b = a.split()
a = int(a)
if int(b) == 0:
  print(a)
  exit()
n = input()
n = [int(i) for i in n.split()]
li = list(range(-250, 250))
for i in n:
  li.remove(i)
mini = [np.inf, 0]
for i in li:
  if abs(i - a) == mini[0]:
    if i < mini[1]:
      mini = [abs(i - a), i]
  elif abs(i - a) < mini[0]:
    mini = [abs(i - a), i]
print(mini[1])

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int, input().split())
lst = [int(input()) for _ in range(n)]
a = 100
b = ''

for i in range(1, 102):
  if i in lst:
    continue

  if a > abs(x-i):
    a = abs(x-i)
    b = i

print(i)

x, n = map(int, input().split())
lst = [int(input()) for _ in range(n)]
a = 100
b = 0

for i in range(1, 102):
  if i in lst:
    continue

  if a > abs(x-i):
    a = abs(x-i)
    b = i

print(i)

x, n = map(int, input().split())
lst = []
if n > 0:
  lst = list(map(int, input().split()))
a = 100
b = 0

for i in range(0, 102):
  if i in lst:
    continue

  if a > abs(x-i):
    a = abs(x-i)
    b = i

print(i)

x, n = map(int, input().split())
lst = list(map(int, input().split()))
a = 100
b = 0

for i in range(1, 102):
  if i in lst:
    continue

  if a > abs(x-i):
    a = abs(x-i)
    b = i

print(i)

x, n = map(int, input().split())
lst = []
if n > 0:
  lst = list(map(int, input().split()))
a = 100
b = 0

for i in range(0, 102):
  if i in lst:
    continue

  if a > abs(x-i):
    a = abs(x-i)
    b = i

print(b)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int, input().split())
if n != 0:
  p = list(map(int, input().split()))
else:
  print(x)

# x, n = 10, 5
# p =  [4, 7, 10, 6, 5]



pl = min(p)-1
pr = max(p)+1
npl = list(range(pl, pr))
np = list(set(npl) - set(p))
np.sort()


mx = x
res = x
for k in np:
  t = abs(k - x)
  if t < mx:
    mx = t
    res = k

print(k)

x, n = map(int, input().split())
p = list(map(int, input().split()))


# x, n = 10, 5
# p =  [4, 7, 10, 6, 5]



p.sort()
pl = min(p)-1
pr = max(p)+1
npl = list(range(pl, pr))
np = list(set(npl) - set(p))
np.sort()


mx = x
res = x
for k in np:
  t = abs(k - x)
  if t < mx:
    mx = t
    res = k

print(k)

x, n = map(int, input().split())
if n != 0:
  p = list(map(int, input().split()))

# x, n = 10, 5
# p =  [4, 7, 10, 6, 5]



pl = min(p)-1
pr = max(p)+1
npl = list(range(pl, pr))
np = list(set(npl) - set(p))
np.sort()


mx = x
res = x
for k in np:
  t = abs(k - x)
  if t < mx:
    mx = t
    res = k

print(k)

x, n = map(int, input().split())
p = list(map(int, input().split()))
if n == 0:
  print(x)
  exit()
  
# x, n = 10, 5
# p =  [4, 7, 10, 6, 5]

# x, n = 6, 5
# p = [4, 7, 10, 6, 5]

# x, n = 1, 1
# # p = list(range(1, 101))
# p = [1]


pl = min(p)-1
pr = max(p)+2
npl = list(range(pl, pr))
np = list(set(npl) - set(p))
if len(np) == 0:
  print(x)
  exit()
np.sort()


mx = x
res = np[0]
for k in np:
  t = abs(k - x)
  if t < mx:
    mx = t
    res = k
 
print(res)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, N = map(int, input().split())
p = list(map(int, input().split()))

min =10000
temp = 0

for i in range(-1000, 1000):
  temp = abs(X - i)
  
  if temp < min and i not in p:
    min = temp
    
print(min)


x, N = int(input().split())
p = list(map(int, int().split()))

min =10000
temp = 0

for i in range(-1000, 1000):
  temp = abs(X - i)
  
  if temp < min and i not in p:
    min = temp
    
print(min)

x, N = int(input().split())
p = list(map(int, input().split()))

min =10000
temp = 0

for i in range(-1000, 1000):
  temp = abs(X - i)
  
  if temp < min and i not in p:
    min = temp
    
print(min)


x, N = map(int, input().split())
p = list(map(int, input().split()))

min =10000
temp = 0

for i in range(-1000, 1000):
  temp = abs(x- i)
  
  if temp < min and i not in p:
    min = temp
    
print(min)


x, N = map(int, input().split())
p = list(map(int, input().split()))

min =10000
temp = 0
num = 10000

for i in range(-1000, 1000):
  temp = abs(x- i)
  
  if temp < min and i not in p:
    min = temp
    num = i
    
print(num)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
import sys

x, n = map(int, input().split())
p = list(map(int, input().split()))
list_p = [i for i in range(-1, 102)] 
t = x
num = x

if(x == n):
  print(x - 1)
  sys.exit()

for i in p:
  list_p[i + 1] = -2

for i in range(len(list_p)):
  if(list_p[i] == -2):
    continue
  else:
    if(abs(list_p[i] - x) <= t):
      t = abs(list_p[i] - x)
      num = min(num, list_p[i])

print(num) 


import sys

x, n = map(int, input().split())
p = list(map(int, input().split()))
list_p = [i for i in range(-1, 102)] 
t = x
num = x

if(x == n):
  print(x - 1)
  sys.exit()

for i in p:
  list_p[i + 1] = -2

for i in range(len(list_p)):
  if(list_p[i] == -2):
    continue
  else:
    if(abs(list_p[i] - x) <= t):
      if(abs(list_p[i] - x) != t):
        t = abs(list_p[i] - x)
        num = list_p[i]
      elif:
        t = abs(list_p[i] - x):
        num = min(num, list_p[i])

print(num) 


import sys

x, n = map(int, input().split())
p = list(map(int, input().split()))
list_p = [i for i in range(-1, 102)] 
t = x
num = x

for i in p:
  list_p[i + 1] = -2

for i in range(len(list_p)):
  if(list_p[i] == -2):
    continue
  else:
    if(abs(list_p[i] - x) <= t):
      if(abs(list_p[i] - x) < t):
        t = abs(list_p[i] - x)
        num = list_p[i]
      elif(abs(list_p[i] - x) == t):
        t = abs(list_p[i] - x)
        num = min(num, list_p[i])
print(num) 


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
X,N = map(int,input().split())
P = [int(i) for i in input().split()]
for i in range(1,100):
    if i in P:
        pass
    else:
        if abs(X-ans) > abs(X-i):
            ans = i
print(ans) if N != 0 else print(X)

X,Y = map(int,input().split())
P = [int(i) for i in input().split()]
temp1 = 1000
ans = 1000
for p in P:
    temp2 = abs(X-p)
    if temp1 > temp2 and temp2 != 0:
        ans = p
        temp1 = temp2
print(ans)

X,N = map(int,input().split())
A = [int(i) for i in input().split()]

ans = 0

for i in range(1,102):
  if i in A:
    pass
  else:
    if abs(ans - X) > abs(i-X):
      ans = i
print(ans)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
temp1 = input().split(" ")
temp1 = [int(i) for i in temp1]
x = temp1[0]
n = temp1[1]

if not n == 0:
    temp2 = input().split(" ")
    temp2 = [int(i) for i in temp2]
else:
    temp2 = []

counter = 1
while True:
    if n == 0:
        print(x)
        break

    mx = x - counter
    px = x + counter

    if not mx in pn:
        print(mx)
        break
    if not px in pn:
        print(px)
        break

    counter += 1

temp1 = input().split(" ")
temp1 = [int(i) for i in temp1]
x = temp1[0]
n = temp1[1]

if not n == 0:
    temp2 = input().split(" ")
    temp2 = [int(i) for i in temp2]
else:
    temp2 = input()
    temp2 = []

pn = temp2

counter = 0
while True:
    if n == 0:
        print(x)
        break

    mx = x - counter
    px = x + counter

    if not mx in pn:
        print(mx)
        break
    if not px in pn:
        print(px)
        break

    counter += 1

Verdicts: Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
package main

import (
	"fmt"
	"math"
	"sort"
)

func main() {
	var X, N int
	fmt.Scanf("%d", &X)
	fmt.Scanf("%d", &N)

	P := make([]int, N)
	for i := 0; i < N; i++ {
		fmt.Scanf("%d", &P[i])
	}
	sort.Ints(P)
	fmt.Println(P)

	var a int = -1
	if len(P) > 0 {
		for p := 0; p < 102; p++ {
			if math.Abs(float64(X) - float64(p)) < math.Abs(float64(X) - float64(a)) && !Contain(P, p) {
				a = p
			}
		}
	} else {
		a = X
	}
	fmt.Println(a)
}

func Contain(s []int, e int) bool {
	for _, v := range s {
		if e == v {
			return true
		}
	}
	return false
}


X, N = map(int, input().split())
P = sorted(list(map(int, input().split())))

a = -1
if len(P) > 0:
    for p in range(0, 102):
        if abs(X - p) < abs(X - a) and (p not in P):
            a = p
else:
    a = X

print(a)


Verdicts: Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
a = list(map(int,input().split()))
if not a[1] ==0:
  b = list(map(int,input().split()))
  b2 = sorted(b)
  if abs(a[0]-b2[0]) <= abs(a[0]-b2[a[1]-1]):
    c = b2[0]-a[0]
  else:
    c = b2[a[1]-1]-a[0] 
  if a[0] < b2[0]:
    print(a[0])
  elif a[0] > b2[a[1]-1]:
    print(a[0])
  else:
    for i in range(a[1]-1):
      if abs(b2[i+1]-b[i])>1:
        for j in range(b2[i+1]-b2[i]-1):
          if abs(c) > abs(b2[i]-a[0]+j+1):
            c = b2[i]-a[0]+j+1
    print(c+a[0])
else:
  print(a[0])

a = list(map(int,input().split()))
if not a[1] ==0:
  b = list(map(int,input().split()))
  b2 = sorted(b)
  if abs(a[0]-b2[0]) <= abs(a[0]-b2[a[1]-1]):
    c = b2[0]-a[0]-1
  else:
    c = b2[a[1]-1]-a[0]+1
  if a[0] < b2[0]:
    print(a[0])
  elif a[0] > b2[a[1]-1]:
    print(a[0])
  else:
    for i in range(a[1]-1):
      if abs(b2[i+1]-b[i])>1:
        for j in range(b2[i+1]-b2[i]-1):
          if abs(c) > abs(b2[i]-a[0]+j+1):
            c = b2[i]-a[0]+j+1
          elif abs(c) == abs(b2[i]-a[0]+j+1) and c > b2[i]-a[0]+j+1:
            c = b2[i]-a[0]+j+1
    print(c+a[0])
else:
  print(a[0])

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int, input().split())
if n == 100:
    print("")
elif n > 0:
    ps = list(map(int, input().split()))
else:
    print(x)
exit()
nums = [n for n in range(1, 101) if n not in ps]

abs_plus = sorted([n-x for n in nums if n-x >= 0])
abs_minus = sorted([-(n-x) for n in nums if n-x < 0])
if abs_plus == []:
    print(x-abs_minus[0])
elif abs_minus == []:
    print(x+abs_plus[0])
elif abs_plus[0] >= abs_minus[0]:
    print(x-abs_minus[0])
else:
    print(x+abs_plus[0])

x, n = map(int, input().split())
if n > 0:
    ps = list(map(int, input().split()))
else:
    print(x)
    exit()
nums = [n for n in range(-1, 102) if n not in ps]

abs_plus = sorted([n-x for n in nums if n-x >= 0])
abs_minus = sorted([-(n-x) for n in nums if n-x < 0])
if abs_plus == []:
    print(x-abs_minus[0])
elif abs_minus == []:
    print(x+abs_plus[0])
elif abs_plus[0] >= abs_minus[0]:
    print(x-abs_minus[0])
else:
    print(x+abs_plus[0])

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int,input().split())
if n != 0:
  p = list(map(int,input().split()))
  p = []
else:
  print(x)

p_change = []
m = 0
for i in p:
    p_change.append(abs(i-x))

if x in p:
    for i in range(n):
        if i != 0 and p_change.count(i) != 2:
            m = i
            break
    if x-m in p:
        print(x+m)
    else:
        print(x-m)
else:
    print(x)

x, n = map(int,input().split())
if n != 0:
  p = list(map(int,input().split()))
p_change = []
m = 0
if n == 0:
  print(x) 

for i in p:
    p_change.append(abs(i-x))

if x in p_change:
	pass
else:
  print(x)
    
for i in range(n):
    if i != 0 and p_change.count(i) != 2:
        m = i
        break
if x-m in p_change:
    print(x+m)
else:
    print(x-m)




x, n = map(int,input().split())
if n != 0:
  p = list(map(int,input().split()))
p_change = []
m = 0
if n == 0:
  print(x)
else:
    for i in p:
        p_change.append(abs(i-x))
 
    if x in p:
        for i in range(n+1):
            if i != 0 and p_change.count(i) != 2:
                m = i
                break
        if x-m in p:
            print(x+m)
        else:
            print(x-m)
    else:
        print(x)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
import numpy as np
X, N = map(int, input().split())
if N == 0:
    print(X)
else:
    p = sorted(list(map(int, input().split())))
    ok = [i for i in range(p[0]-1, p[-1]+1) if i not in p]
    print(ok)
    ix = np.argmin(list(map(lambda a: abs(X-a), ok)))
    print(ok[ix])


import numpy as np
X, N = map(int, input().split())
if N == 0:
    print(X)
else:
    p = sorted(list(map(int, input().split())))
    ok = [i for i in range(-101, 201) if i not in p]
    ix = np.argmin(list(map(lambda a: abs(X-a), ok)))
    print(ok[ix])


Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x,n=map(int,input().split())
a=set(map,int(input().split()))
print(min([i for i in range(102) if i not in a],key=lambda y:abs(x-y)))

x, n = map(int, input().split())
a = set(map(int, input().split()))
print(min([i for i in range(102) if i not in a], key=lambda y:abs(x-y)))

Verdicts: Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
X ,N = map(int,input().split())
if N == 0:
    print(X)
else:
    p = list(map(int,input().split()))

    X_u = X - 1
    X_l = X + 1
    while judge:
        X_u += 1
        X_l -= 1
        if X_u not in p and X_l not in p:
            print(X_l)
            break
        elif X_u not in p:
            print(X_u)
            break
        elif X_l not in p:
            print(X_l)
            break
        else:
            if X_u == X_l:
                p.remove(X_u)
            else:
                p.remove(X_u)
                p.remove(X_l)

X ,N = map(int,input().split())
if N == 0:
    print(X)
else:
    p = list(map(int,input().split()))

    add_minus = -1
    while True:
        add_minus += 1
        if (X - add_minus) not in p:
            print(X - add_minus)
            break
        elif (X + add_minus) not in p:
            print(X+add_minus)
            break
        

Verdicts: Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int, input().split())
p = list(map(int, input().split()))

diff = 1000
for i in range(-100, 110):
    if i in p:
        continue
    if abs(i - x) < diff:
        diff = abs(i - x)
        print(diff)
        ans = i

print(ans)

x, n = map(int, input().split())
p = list(map(int, input().split()))

diff = 1000
for i in range(-100, 110):
    if i in p:
        continue
    if abs(i - x) < diff:
        diff = abs(i - x)
        ans = i

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
lst1 = input().split()
lst2 = input().split()

first = int(lst1[0])
now = 0
plm = 1
flag = 0
while flag == 0:
    if plm == -1:
        plm = 1
    else:
        now += 1
        plm = -1
    for i in lst2:
        if first+now*plm == int(i):
            break
        flag = 1
print(first+now*plm)

lst1 = input().split()
lst2 = input().split()
key = int(lst1[0])
lst = []
for i in range(102):
    lst.append(i)
for i in lst2:
    lst.remove(int(i))
for i in range(len(lst)):
    if lst[i] > key:
        break
if lst[i] - key < key - lst[i-1]:
    print(lst[i])
else:
    print(lst[i-1])

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
X, N = map(int, input().split())
P = list(map(int, input().split()))
differ=[]

if N == 0:
    print(X)
else:
    for i in range(0,102):
        if i not in P:
            differ.append(abs(X - i))
        else:
            differ.append(1000)
    ans = differ.index(min(differ))
    print(differ)
    print(ans)


X, N = map(int, input().split())
P = list(map(int, input().split()))
differ=[]

if N == 0:
    print(X)
else:
    for i in range(1,100):
        if i not in P:
            differ.append(abs(X - i))
        else:
            differ.append(1000)
    
    ans = differ.index(min(differ))

    print(differ)
    print(ans+1)


X, N = map(int, input().split())
P = list(map(int, input().split()))
differ=[]

if N == 0:
    print(X)
else:
    for i in range(0,100):
        if i not in P:
            differ.append(abs(X - i))
        else:
            differ.append(1000)
    ans = differ.index(min(differ))
    print(differ)
    print(ans)


X, N = map(int, input().split())
P = list(map(int, input().split()))
differ=[]

if N == 0:
    print(X)
else:
    for i in range(0,102):
        if i not in P:
            differ.append(abs(X - i))
        else:
            differ.append(1000)
    ans = differ.index(min(differ))
    print(ans)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int,input().split())
a = list(map(int, input().split()))
a.sort()

nota = list()

for i in range(1, 101):
    if i in a:
        continue
    nota.append(i)

print(nota)
nota.sort()
ans = 1000
minabs = 1000
for i in nota:
    if minabs > abs(i-x):
        minabs = abs(i-x)
        ans = i

print(ans)

x, n = map(int,input().split())
a = list(map(int, input().split()))
a.sort()

nota = list()

for i in range(-1000, 1001):
    if i in a:
        continue
    nota.append(i)

nota.sort()
ans = 1000
minabs = 1000
for i in nota:
    if minabs > abs(i-x):
        minabs = abs(i-x)
        ans = i

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n  = map(int, input().split())
p = map(int, intput().split())

m = -1
for a in p:
  if m == -1 or (abs(a - x) < abs(m - x)) or (abs(a - x) == abs(m - x) and a < m):
    m = a

print(m)

x, n  = map(int, input().split())
if n > 0:
  p = set(map(int, input().split()))
  i = 0
  while True:
    if x - i not in p:
      print(x-i)
      break
    if x + i not in p:
      print(x+i)
      break
    i += 1
else:
  print(x)
    


Verdicts: Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int, input().split())
num_list = list(map(int, input().split()))
dif = 101
o_list = []
num_list.sort(reverse=True)

if len(num_list) == 0:
    print(x)
    exit()

for i in range(1, max(num_list)):
    if i not in num_list:
        o_list.append(i)
#
# for num in num_list:
#     if abs(x - num) <= dif:
#         if x not in num_list:
#             ans = x
ans = x
o_list.sort(reverse=True)

for num in o_list:
    if abs(x - num) <= dif:
        # if x not in num_list:
        dif = x -num
        ans = num

print(ans)

x, n = map(int, input().split())
num_list = list(map(int, input().split()))
dif = 100000
o_list = []

if len(num_list) == 0:
    print(x)
    exit()
#

#     if i not in num_list:
#         o_list.append(i)

for i in range(-1000, 1000):
    if i not in num_list:
        o_list.append(i)

o_list.sort(reverse=True)

for num in o_list:
    if abs(x - num) <= dif:
        # if x not in num_list:
        dif = abs(x -num)
        ans = num

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x, n = map(int, input().split())
p = list(map(int, input().split()))

p_all = set(range(-101, 101)) - set(p)
print(p_all)

mi = float('inf')
ans = 0
for i in p_all:
    if abs(x - i) < mi:
        mi = abs(x - i)
        ans = i

print(ans)


x, n = map(int, input().split())
p = list(map(int, input().split()))

p_all = set(range(0, 102)) - set(p)
# print(p_all)

mi = float('inf')
ans = 0
for i in p_all:
    if abs(x - i) < mi:
        mi = abs(x - i)
        ans = i

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
d = {i: 1 for i in p}
idx = X
while True:
    if d.get(idx) is None:
        ans_plus = idx
        break
    else:
        idx += 1

idx = X
while True:
    if d.get(idx) is None:
        ans_minus = idx
        break
    else:
        idx -= 1

if abs(X - ans_plus) < abs(X - ans_minus):
    print(ans_plus)
elif abs(X - ans_plus) > abs(X - ans_minus):
    print(ans_minus)
else:
    print(ans_minus)

X, N = map(int, input().split())
p = list(map(int, input().split()))

d = {i: 1 for i in p}
idx = X
while True:
    if d.get(idx) is None:
        ans_plus = idx
        break
    else:
        idx += 1

idx = X
while True:
    if d.get(idx) is None:
        ans_minus = idx
        break
    else:
        idx -= 1

if abs(X - ans_plus) < abs(X - ans_minus):
    print(ans_plus)
else:
    print(ans_minus)

Verdicts: Runtime Error

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
X, N=list(map(int,input().split()))
p=list(map(int,input().split()))
for i in range(N+1):
    if X-i not in p:
        print(X-i)
        break
    if X+i not in p:
        print(X+i)

X, N=list(map(int,input().split()))
p=list(map(int,input().split()))
for i in range(N+1):
    if X-i not in p:
        print(X-i)
        break
    if X+i not in p:
        print(X+i)
        break

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
x_n = input()
x_n_list = x_n.split()
x = int(x_n_list[0])
n = int(x_n_list[1])
if n == 0:
  print(x)
else:
  allp = input()
  p_list = allp.split()
  p_l = [int(n) for n in p_list]
  if x not in p_l:
    print(x)
  else:
    for i in range(len(p_l)):
      if x - i in p_l:
        print(x - i - 1)
        break
      elif x + i in p_l:
        print(x + i + 1)
        break
      else:
        pass

x_n = input()
x_n_list = x_n.split()
x = int(x_n_list[0])
n = int(x_n_list[1])
if n == 0:
  print(x)
else:
  allp = input()
  p_list = allp.split()
  p_l = [int(n) for n in p_list]
  if x not in p_l:
    print(x)
  else:
    for i in range(len(p_l)):
      if x - i - 1 not in p_l:
        print(x - i - 1)
        break
      elif x + i + 1 not in p_l:
        print(x + i + 1)
        break
      else:
        pass

Verdicts: Wrong Answer

Accepted
Problem: Given are an integer X and an integer sequence of length N: p_1, \ldots, p_N.  Among the integers not contained in the sequence p_1, \ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find the integer whose absolute difference with X is the minimum. If there are multiple such integers, report the smallest such integer.

Submission attempts (in order):
import collections
x, n = map(int,input().split())
P = list(map(int, input().split()))

PX = list(map(lambda p: p-x,P))
CPX = collections.Counter(PX)
ans = 0

for i in range(max(max(P),x))
  if CPX[-i] == 0:
    ans = x -i
    break
  elif CPX[i] == 0:
    ans = x +i
    break

print(ans)

import collections
x, n= map(int, input().split())
P = list(map(int, input().split()))
 
PX = list(map(lambda p: p-x,P))
CPX = collections.Counter(PX)
ans = 0
 
for i in range(max(max(P),x)):
  if P = []:
    ans = x
    break
  elif CPX[-i] == 0:
    ans = x -i
    break
  elif CPX[i] == 0:
    ans = x +i
    break

print(ans)

import collections
x, n= map(int, input().split())
P = list(map(int, input().split()))
 
PX = list(map(lambda p: p-x,P))
CPX = collections.Counter(PX)
ans = 0
 
for i in range(100):
  elif CPX[-i] == 0:
    ans = x -i
    break
  elif CPX[i] == 0:
    ans = x +i
    break

print(ans)

import collections
x, n= map(int, input().split())
P = list(map(int, input().split()))
 
PX = list(map(lambda p: p-x,P))
CPX = collections.Counter(PX)
ans = 0
 
for i in range(100):
  elif CPX[-i] == 0:
    ans = x -i
    break
  elif CPX[i] == 0:
    ans = x +i
    break

print(ans)

import collections
x, n= map(int, input().split())
P = list(map(int, input().split()))
 
PX = list(map(lambda p: p-x,P))
CPX = collections.Counter(PX)
ans = 0

for i in range(100):
  if CPX[-i] == 0:
    ans = x -i
    break
  elif CPX[i] == 0:
    ans = x +i
    break

print(ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted