Problem: We have five variables x_1, x_2, x_3, x_4, and x_5.  The variable x_i was initially assigned a value of i.  Snuke chose one of these variables and assigned it 0.  You are given the values of the five variables after this assignment.  Find out which variable Snuke assigned 0.

Submission attempts (in order):
import sys

X,N = map(int,input().split())
P = list(map(int,input().split()))
if X < 1 or 100 < X:
    sys.exit()
if N < 0 or 100 < N:
    sys.exit()
if N == 0:
    print(X)
    sys.exit()

P_number = len(P)
if P_number < 1 or 100 < P_number:
    sys.exit()

res1 = 100
res2 = 100
res0 = 0
i = 0
j = 0
while i < N:
    if (X - i) not in P:
        res1 = (X - i)
    i += 1
while j < N:
    if (X + j) not in P:
        res2 = (X + j)
    j += 1
if res2 > res1:
    res0 = res1
elif res1 > res2:
    res0 = res2
elif res2 == res1:
    res0 = res1
print(res0)


X = list(map(int, input().split()))
if X[0] > 100 or X[1] > 100:
  no_print
if X[1] > X[0]*4 or X[1] < X[0]*2:
  no_print
if X[1] % 2 == 1:
  no_print
 
number_check
  
def no_print():
  print(No)
  exit
 
def number_check():
  turtle = X[0]
  crane = 0
  i = 0
  while i < X[0]:
    result = turtle * 4 + crane * 2 
    if result > X[1]:
      crane += 1
      turtle -= 1
    if result == X[1]:
      print(Yes)
      exit
    if result < X[1]:
      turtle += 1
      crane -= 1
    i += 1  

import sys

X,N = map(int,input().split())
P = list(map(int,input().split()))
if X < 1 or 100 < X:
    sys.exit()
if N < 0 or 100 < N:
    sys.exit()
if N == 0:
    print(X)
    sys.exit()

P_number = len(P)
if P_number < 1 or 100 < P_number:
    sys.exit()

res1 = 100
res2 = 100
res0 = 0
i = 0
while i < N:
    if (X - i) not in P:
        res1 = (X - i)
    i += 1
while j < N:
    if (X + j) not in P:
        res2 = (X + j)
    j += 1
if res2 > res1:
    res0 = res1
else if res1 > res2:
    res0 = res2
else if res2 == res1:
    res0 = res1
print(res0)





1,2,3,4,5 = input()
count = 0
for I in input():
  if I == 0:
    print(count)
  count++

import sys
array = list(map(int,input().split()))

print(array.index(0))

import sys

X,N = map(int,input().split())
P = list(map(int,input().split()))
if X < 1 or 100 < X:
    sys.exit()
if N < 0 or 100 < N:
    sys.exit()
if N == 0:
    print(X)
    sys.exit()

P_number = len(P)
if P_number < 1 or 100 < P_number:
    sys.exit()

res1 = 100
res2 = 100
res0 = 0
i = 0
j = 0
while i < N:
    if (X - i) not in P:
        res1 = (X - i)
    i += 1
while j < N:
    if (X + j) not in P:
        res2 = (X + j)
    j += 1
if res2 > res1:
    res0 = res1
elif res1 > res2:
    res0 = res2
elif res2 == res1:
    res0 = res1
print(res0+X)


import sys

X = list(map(int, input().split()))
def no_print():
  print('No')
  sys.exit()
 
def number_check():
  turtle = X[0]
  crane = 0
  i = 0
  while i < X[0]:
    result = turtle * 4 + crane * 2 
    if result > X[1]:
      crane += 1
      turtle -= 1
    if result == X[1]:
      print('Yes')
      break
    if result < X[1]:
      turtle += 1
      crane -= 1
    i += 1

if X[0] > 100 or X[1] > 100:
  no_print()
if X[1] > X[0]*4 or X[1] < X[0]*2:
  no_print()
if X[1] % 2 == 1:
  no_print()
number_check()


import sys

X,N = map(int,input().split())
P = list(map(int,input().split()))
if X < 1 or 100 < X:
    sys.exit()
if N < 0 or 100 < N:
    sys.exit()
if N == 0:
    print(X)
    sys.exit()

P_number = len(P)
if P_number < 1 or 100 < P_number:
    sys.exit()

res1 = 100
res2 = 100
res0 = 0
i = 0
j = 0
while i <= N:
    if (X - i) not in P:
        res1 = (X - i)
        break
    i += 1
while j <= N:
    if (X + j) not in P:
        res2 = (X + j)
        break
    j += 1
if i > j:
    res0 = res2
elif j > i:
    res0 = res1
elif i == j:
    res0 = res1
print(res0)


X = list(map(int, input().split()))
def no_print():
  print('No')
  exit
 
def number_check():
  turtle = X[0]
  crane = 0
  i = 0
  while i < X[0]:
    result = turtle * 4 + crane * 2 
    if result > X[1]:
      crane += 1
      turtle -= 1
      print(crane)
      print(turtle)
    if result == X[1]:
      print('Yes')
      break
    if result < X[1]:
      turtle += 1
      crane -= 1
      print(crane)
      print(turtle)
    i += 1

if X[0] > 100 or X[1] > 100:
  no_print()
if X[1] > X[0]*4 or X[1] < X[0]*2:
  no_print()
if X[1] % 2 == 1:
  no_print()
number_check()


import sys

X,N = map(int,input().split())
P = list(map(int,input().split()))
if X < 1 or 100 < X:
    sys.exit()
if N < 0 or 100 < N:
    sys.exit()

P_number = len(P)
if P_number < 1 or 100 < P_number:
    sys.exit()

res = [100,100]
i = 0
while i < N:
    if res[0] >= abs(X - P[i]) and res[1] > P[i]:
        res[0] = abs(X - P[i])
        res[1] = P[i]
    i += 1
print(res[1])

X = list(map(int, input().split()))
count = 0
for I in X:
  if I == 0:
    print(count):
    exit
  count++

import sys
array = list(map(int,input().split()))

print(array.index(0)+1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted