Problem:


Score : 100 points

Problem Statement

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.

Constraints

The values of x_1, x_2, x_3, x_4, and x_5 given as input are a possible outcome of the assignment by Snuke.

Input

Input is given from Standard Input in the following format:

x_1 x_2 x_3 x_4 x_5

Output

If the variable Snuke assigned 0 was x_i, print the integer i.

Sample Input 1

0 2 3 4 5

Sample Output 1

1

In this case, Snuke assigned 0 to x_1, so we should print 1.

Sample Input 2

1 2 0 4 5

Sample Output 2

3



Sample input:
0 2 3 4 5


Sample output:
1

Submission status: Runtime Error

Solution code:
import math

x1=int(input())
x2=int(input())
x3=int(input())
x4=int(input())
x5=int(input())

if x1 == 0:
  print(1)
else:
  if x2 == 0:
    print(2)
  else:
    if x3 == 0:
      print(3)
    else:
      if x4 == 0:
        print(4)
      else:
        if x5 == 0:
          print(5)

Submission status: Runtime Error

Solution code:
N=list(map(int,input().splti()))]
print(15-n[01]-n[1]-n[2]-n[3]-n[4])

Submission status: Runtime Error

Solution code:
n=list(map(int,input().split()))
for i in range(len(n)):
  if n[i]==0:
    return i

Submission status: Runtime Error

Solution code:
x1, x2, x3, x4, x5 = int(input())

if x1 = 0:
    print(1)

if x2 = 0:
    print(2)

if x3 = 0:
    print(3)

if x4 = 0:
    print(4)

if x5 = 0:
    print(5)

Submission status: Runtime Error

Solution code:
def function(ar):
  print((ar.index(0))+1)

if __name__==__"main"__:
  ar=list(map(int, input().rstrip().split()))
  function(ar)

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split())
         
for i in range(5):
    if x[i] ==0:
         print(i+1)
         
         break

Submission status: Runtime Error

Solution code:
a = list(map(int, input()))
print(sum(range(1, 5 + 1)) - sum(a))

Submission status: Runtime Error

Solution code:
n=int(input())
l=list(map(int,input().split()))
a=[0]*(10**6+1)
for i in range(n):
    if(a[l[i]]==0):
       for j in range(2*l[i],10**6+1,l[i]):
           a[j]=2
    a[l[i]]+=1
print(a.count(1))

Submission status: Runtime Error

Solution code:
x,y = (map(int,input().split()))

if y%2 != 0:
    print('No')
elif 2*x <= y <= 4*x:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
x1,x2,x3,x4,x5 = map(int, input().split())

if x1 == 0:
    print(1)
elif x2 == 0:
    print(2)
elif x3 == 0:
    print(3)
elif x4 == 0:
    print(4)
elif x5 == 0:

Submission status: Runtime Error

Solution code:
a,b,c,d,e=map(int,input().split()))
if(a==0):
    print(1)
if(b==0):
    print(2)
if(c==0):
    print(3)
if(d==0):
    print(4)
if(e==0):
    print(5)

Submission status: Runtime Error

Solution code:
X = list(map(int,input().split()))

if X[0]==0:
  print(1)
 elif X[1] == 0:
    print(2)
 elif X[2] == 0:
    print(3)
 elif X[3] == 0:
    print(4)
 else:
    print(5)

Submission status: Runtime Error

Solution code:
X = list(map(int,input().split()))

if X[0]==0:
  print(1)
  elif X[1] == 0:
    print(2)
    elif X[2] == 0:
      print(3)
      elif X[3] == 0:
        print(4)
        else:
          print(5)

Submission status: Runtime Error

Solution code:
X = list(map(int, input().split()))
for i in range(len(X)):
  if X[i-1] = 0:
    print(i)

Submission status: Runtime Error

Solution code:
x,n=map(int,input().split())
p=set(list(map(int,input().split())))
ans=0
flag=0
while flag==0:
    if not x-ans in p:
        print(x-ans)
        flag=1
    elif not x+ans in p:
        print(x+ans)
        flag=1
    ans+=1

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))

cnt = 1
for i in range(a):
  if i == 0:
    print(cnt)
    cnt += 1

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))

cnt = 1
for i in range(a):
  if i == 0:
    print(cnt)
    cnt += 1

Submission status: Runtime Error

Solution code:
a = map.int(input().split())
print(15 - sum(a))

Submission status: Runtime Error

Solution code:
from bisect import bisect_left, bisect_right

n = int(input())
a = list(map(int, input().split()))
a.sort()
m = a[-1]
c = [0] * (m + 1)

for ai in a:
    for i in range(ai, m + 1, ai):
        if bisect_right(a, i) - bisect_left(a, i) == 1:
            c[i] += 1

print(c.count(1))

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
A = list(map(int,input().split()))

A = np.array(A)

A.sort()

d = {}

for a in A:
    d.setdefault(a,0)
    d[a] += 1

sieve = [True] * (A[-1] + 1)

for a in A:
    if sieve[a] == False:
        continue
    if d[a] > 1:
        sieve[a] = False
    for i in range(a + a, A[-1] + 1, a):
        sieve[i] = False

print(sum(1 for a in A if sieve[a]))

Submission status: Runtime Error

Solution code:
 x = list(map(int, input().split()))
print(x.index(0) + 1)

Submission status: Runtime Error

Solution code:
x=list(map(int,input().split()))

for i in x:
    if x[i]==0:
        print(i+1)

Submission status: Runtime Error

Solution code:
l =0 
for i in range(5) : 
  n = int(input("en"))
  if n == 0 :
    l = i + 1
print(l)

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))
 
for i in range(len(x)):
	if x[i] == 0:
    	print(i+1)
    	break

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))
 
for i in range(len(x)):
	IF x[i] == 0:
    	print(i+1)
    	break

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))
 
for i in range(len(x)):
	IF x[i] == 0:
    	print(i+1)
    ELSE:
    	pass

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))

for i in x:
	IF x[i] == 0:
    	print(i+1)
    ELSE:
    	pass

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))

for i in x:
	IF x[i] == 0:
    	i
    ELSE:
    	pass

Submission status: Runtime Error

Solution code:
L1=list(map(int,input().split()))
for i in range(len(l1)):
  if l1[i]==0:
    print(i+1)
    break

Submission status: Runtime Error

Solution code:
import numpy as np
n = int(input())
if n != 1:
  arr = np.asarray([[int(x) for x in input().split()]])
  arrT = arr.T
  eye = np.eye(n)
  ans = np.count_nonzero(arrT % arr + eye == 0, axis=1)
  ans = np.count_nonzero(ans == 0)
  print(ans)
else:
  print(input())

Submission status: Runtime Error

Solution code:
a=int(input())
a=a.split(" ")
c=0
for i in a:
    c+=1
    if i==0:
        break
print(c)

Submission status: Runtime Error

Solution code:
a=list(input())

for i in len(a):
  if 0==a[i]:
    print(i)
    break

Submission status: Runtime Error

Solution code:
arr = map(int, input().split())
for i in range(len(arr)):
  if (arr[i] == 0):
    print(i+1)

Submission status: Runtime Error

Solution code:
X,N = map(int,input().split())
A = list(map(int,input().split()))
for d in range(X+1):
  for i in [-1, +1]:
    B = X + d*i
    if A.count(B) == 0:
      print(B)
      exit(0)

Submission status: Runtime Error

Solution code:
X,N = map(int,input().split())
A = list(map(int,input().split()))
for d in range(X+1):
  for i in [+1,-1]:
    B = X + d*i
    if A.count(B) == 0:
      print(B)
      exit(0)

Submission status: Runtime Error

Solution code:
nums = map(int, input().split())
for i in range(5):
  if nums[i] == 0:
    nums[i] = i

Submission status: Runtime Error

Solution code:
nums = map(int, input().split())
for i in range(5):
  if num[i] == 0:
    nums[i] = i

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())
if y < x * 4 and y > x * 2 and y % 2 != 0:
    ans ="No"
else :
    ans ="Yes"
print(ans)

Submission status: Runtime Error

Solution code:
x,n=map(int, input().split())
l=list(map(int ,input().split()))
i=0
while(True):
    if (x-i) not in l:
        print(x-i)
        break
    if(x+i) not in l:
        print(x+i)
        break
    i+=1

Submission status: Runtime Error

Solution code:
l=list(map(input().split()))
print(l.index(0)+1)

Submission status: Runtime Error

Solution code:
l=list(map(input().split()))
print(l.index(0))

Submission status: Runtime Error

Solution code:
x,n = map(int,input().split())
P = list(map(int,input().split()))
 
for i in range(101):
  xl = x - i
  xr = x + i
  if xl not in P:
    print(xl)
    break
  elif xr not in P:
    print(xr)
    break

Submission status: Runtime Error

Solution code:
lst = list(map(int,input().split()))
for e in range(len(lst)):
    if lst[e] == 0;
        print(lst[e]+1)

Submission status: Runtime Error

Solution code:
X, N = map(int, input().split())
p = list(map(int, input().split()))
for d in range(X + 1):
    for s in [-1, +1]:
        
        a = X + s * d
        if p.count(a) == 0:
            print(a)
            exit(0)

Submission status: Runtime Error

Solution code:
X, N = map(int, input().split())
p = list(map(int, input().split()))
for d in range(X + 1):
    for s in [-1, +1]:
            a = X + s * d
			if p.count(a) == 0:
				print(a)
				exit(0)

Submission status: Runtime Error

Solution code:
X, N = map(int, input().split())
p = list(map(int, input().split()))
for d in range(X + 1):
    for s in [-1, +1]:
            a = X + s * d
if p.count(a) == 0:
	print(a)
exit(0)

Submission status: Runtime Error

Solution code:
from sys import stdin
data = stdin.readlines()

n = int(data[0].split()[0])
a = [int(s) for s in data[1].split()]
a = sorted(a)

max = a[-1]

l = [0]*(max+1)

for i in a:
    l[i] += 1
    if l[i] == 1:
        for j in range(i*2,max+1,i):
            l[j] = 2
print(l.count(1))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[19]:


#170A
#Five Variables

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


# In[ ]:


x = list(map(int,input().split()))
print(x.index(0)+1)

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())
if y%2==0 and 2*x<=y and y<=4*x:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
 X = list(map(int, input().split()))

 if X[0] == 0:
   	print(1)
 elif X[1] == 0:
   	print(2)
 elif X[2] == 0:
  	print(3)
 elif X[3] == 0:
	print(4)
 else:
	print(5)

Submission status: Runtime Error

Solution code:
for i in range(5):
  if int(input()) == 0:
    print(i + 1)

Submission status: Runtime Error

Solution code:
X, N = map(int,input().split())
p_list = list(map(int, input().split()))

p_list.sort()
r = 200
answer = 101

for i in range(0, 102):
    if i in p_list:
        continue
    else:
        if r > abs(i - X):
            r = abs(i - X)
            answer = i
        else:
            print(answer)
            break

Submission status: Runtime Error

Solution code:
s=[]
x,n=map(int,input().split())
if n==0:
  print(x)
  exit()
  
s=list(map(int,input().split()))
slist=sorted(s)
out=0
for i in range(0,1000):
  out=0
  for j in range(n):
    if slist[j]==x-i:
      out=1
  if out !=1:
   print(x-i)
   exit()
  out=0
  for k in range(n):
    if slist[k]==x+i:
      out=1
  if out !=1:
    print(x+i)
    exit()

Submission status: Runtime Error

Solution code:
s=[]
x,n=map(int,input().split())
s=list(map(int,input().split()))
slist=sorted(s)

if n==0:
  print(x)
  exit()
for i in range(0,101):
  for j in range(n):
    if slist[j]==x-i:
        flag=1
    if slist[j]==x+i:
        flag=2
            
  if flag==2:
    flag=0
  elif flag==0:
    print(x-i)
    exit()
  elif flag==1:
    print(x+i)
    exit()

Submission status: Runtime Error

Solution code:
s=list(map(int,input().split())
for i in range(5):
  if s[i]==0:
     print(i+1)
     exit()
  else:
     pass

Submission status: Runtime Error

Solution code:
s=list(map(int,input().stlip())
for i in s:
  if i==0:
     print(i+1)
     exit()
  else:
     pass

Submission status: Runtime Error

Solution code:
x = list(map(int, input().split()))

for i in x:
    if x[i]==0:
        print(i)

Submission status: Runtime Error

Solution code:
x,n=map(int,input().split())

p=set(map(int,input().split()))

n=set(n for n in range(-100,101))

pd=list(n-p)

min1=1000

for i in range(len(pd)):
    if abs(pd[i]-x)<abs(min1-x):
        min1=pd[i]
    elif abs(pd[i]-x)==abs(min1-x):
        min1=min(pd[i],min1)
print(min1)

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())

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

Submission status: Runtime Error

Solution code:

X=list(map(int,input()))

for i in range(0,4):
    if X[i]==0:
        print(i+1)

Submission status: Runtime Error

Solution code:
x,y = int(input().split())
 
if x*4>y and y<x*2 and y%2 == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n,l = map(int,input().split())

for i in range(n+1):
  if 4*i+2*(n-i)-l == 0:
    print("Yes")
    break
  else:
    print("No")

Submission status: Runtime Error

Solution code:
C

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())
import math

#yをxこの2,4の組み合わせで記述できるか
#yを4で割った余りが0か2で
#あまり無し商<=x あまりあり商＋１<=x
#2で割った時、余りが0且つ商をnとするとn/2(切り上げ)>=x

n=y//2
if y%2==0 and math.ceil(n/2)+1>=x:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
sieve=[0]*1000009
n=int(input())
s=sorted(map(int,input().split()))
for i in s:
    if sieve[i]<2:
        for j in range(i,1000009,i):sieve[j]+=1
print(sum(sieve[i]==1for i in s))

Submission status: Runtime Error

Solution code:
r = 1
for i in range(input().split(' ')):
 r ^= int(i)
print(r)

Submission status: Runtime Error

Solution code:
x,n = map(int,input().split())
p = input().split()
p.sort()
q = p[::-1]
a = x
b = x
for i in q:
  if a == int(i):
    a -= 1
for i in p:
  if b == int(i):
    b += 1 
if x - a <= b - x:
  print(a)
else:
  print(b)

Submission status: Runtime Error

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

for d in range(X + 1):
    if (X - d) not in p:
        print(X-d)
        exit()
    elif (X + d) not in p:
        print(X+d)
        exit()

Submission status: Runtime Error

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

for d in range(X + 1):
    if X - d not in p:
        print(X-d)
        exit()
    elif X + d not in p:
        print(X+d)
        exit()

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] == 0:
    print(i+!)
    break

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] = 0:
    print(i)
    break

Submission status: Runtime Error

Solution code:
x = list(input())
for i in range(len(x)):
  if x[i] = 0:
    print(x[i])
    break

Submission status: Runtime Error

Solution code:
A = list(map(int, input().split()))

for i in range(A):
    if A[i] == i+1:
        print(i+1)

Submission status: Runtime Error

Solution code:
x  = (list(map(int,input().split()))
x = sum(x)
ans = 15-x
print(ans)

Submission status: Runtime Error

Solution code:
 X = list(map(int, input().split()))

 if X[0] == 0:
 print(1)
 elif X[1] == 0:
 print(2)
 elif X[2] == 0:
 print(3)
 elif X[3] == 0:
 print(4)
 else:
 print(5)
 print(15 - sum(list(map(int, input().split()))))

Submission status: Runtime Error

Solution code:
X = list(map(int, input().split()))
2
3 if X[0] == 0:
4 print(1)
5 elif X[1] == 0:
6 print(2)
7 elif X[2] == 0:
8 print(3)
9 elif X[3] == 0:
10 print(4)
11 else:
12 print(5)
1 print(15 - sum(list(map(int, input().spl

Submission status: Runtime Error

Solution code:
import numpy as np

def main():
  N = int(input())
  A = list(map(int,input().split()))
  A.sort()
  d = np.zeros(A[-1]+1, dtype=np.unit64)
  
  for i in range(N):
    a = A[i]
    a1 = A[i-1]
    if a != a1:
      if a != a1:
        d[a::a] += 1
      else:
        d[a] += 1
  print(np.count_nonzero(d[A] == 1))
  
main()

Submission status: Runtime Error

Solution code:
l=list(map(int,input().split()))
c=collections.Counter(l)
def j(n):
  judge=1
  for k  in c.keys():
      if n%k==0:
        if n!=k:
          judge=0
          break
  return judge
count=0
if len(list(c.keys()))==1:
       print(count)
else:
  for k in c.keys():
    if j(k)==1:
      count+=1
  print(count)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
A.sort()
ma=A[-1]
dp=[1]*(ma+1)
ans=0

for i in range(len(A)-1):
  p=A[i]
  if dp[i]==1:
    for q in range(ma//p+1):
      dp[p*q]=0
    if A[i]!=A[i+1]:
      ans+=1
if dp[ma]==1:
  ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
D = list(map(int, input().split()))

for i in D:
    if D[i]==0:
        print(i)

Submission status: Runtime Error

Solution code:
import sys
from collections import deque
h,w,k = map(int, sys.stdin.readline().rstrip("\n").split())
sx,sy,gx,gy = map(int, sys.stdin.readline().rstrip("\n").split())
sx,sy,gx,gy = sx-1,sy-1,gx-1,gy-1
labyrinth = [line.rstrip("\n") for line in sys.stdin]
INF = float('inf')
footprint = [ [[(INF,INF)]*4 for j in range(w)] for i in range(h) ]
m = [(-1, 0), (0, 1), (1, 0), (0, -1)]
q = deque()
for d in range(4):
    footprint[sx][sy][d] = (1,0)
    q.append((sx,sy,d,1,0))
while q:
    x, y, d, c, kk = q.popleft()
    for nd in range(4):
        if nd == d:
            mx,my = m[d]
            nkk = 1 if kk == k else kk + 1
            nc = c + 1 if kk == k else c
        else:
            mx,my = 0,0
            nkk = 0
            nc = c + 1
        nx = x + mx
        ny = y + my
        if 0 <= nx < h and 0 <= ny < w and labyrinth[nx][ny] == '.' and footprint[nx][ny][nd] > (nc, nkk):
            footprint[nx][ny][nd] = (nc, nkk)
            if nc == c:
                q.appendleft((nx, ny, nd, nc, nkk))
            else:
                q.append((nx, ny, nd, nc, nkk))
ans = INF
for d in range(4):
    ans = min(ans, footprint[gx][gy][d][0])
ans = -1 if ans == INF else ans
print(ans)

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())
a = 4 * x - y
b = y - 2*x
if a/2 == a//2 and a >= 0 and b/2 == b//2 and b >= 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
X = list(map(int, inout().split()))

if X[0] == 0:
  print(1)
elif X[1] == 0:
  print(2)
elif X[2] == 0:
  print(3)
elif X[3] == 0:
  print(4)
else:
  print(5)

Submission status: Runtime Error

Solution code:
N = int(input())
A = input()
A = A.split()
A = [int(c) for c in A]
A.sort()
count = 0
for i in range(N):
    for j in range(i,N):
        if A[i] % A[j] == 0 and i != j:
            count += 1
            break
print(N-count)

Submission status: Runtime Error

Solution code:
x  = (list[map(int,input().split()))
x = sum(x)
ans = 15-x
print(ans)

Submission status: Runtime Error

Solution code:
x  = list[map(int,input().split())]
x = sum(x)
ans = 15-x
print(ans)

Submission status: Runtime Error

Solution code:
lists = [int(x) for x in range(1,6)]
for i in range(1,len(list)+1):
  if list[i] == 0:
    print(i)

Submission status: Runtime Error

Solution code:
N = int(input())
A = input()
A = A.split()
A = [int(c) for c in A]
count = 0
for i in range(N):
    for j in range(N):
        if A[i] % A[j] == 0 and i != j:
            count += 1
            break
print(len(A)-count)

Submission status: Runtime Error

Solution code:
_, *a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0] * m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]for i in a))

Submission status: Runtime Error

Solution code:
x = list(map(int, input().split))
for i in x:
    if i == 0:
        print(i)

Submission status: Runtime Error

Solution code:
l=list(map(int,input.split(" ")))
print(l.index("0")+1)

Submission status: Runtime Error

Solution code:
x = list(map(int, input.split()))
print(x.index(0))

Submission status: Runtime Error

Solution code:
x = list(map(int, input.split()))
print(15 - sum(x))

Submission status: Runtime Error

Solution code:
arr = [int(x) for x in input()]
c=1
for i in arr:
 if i==0:
  print(c)
 else:
  c+=1

Submission status: Runtime Error

Solution code:
arr = list(map(int,input().split()))

for i,j in enumerate(len(arr)):
    if j==0:
        print(i)

Submission status: Runtime Error

Solution code:
N=int(input())
A=[int(_) for _ in input().split()]
B=[]
for i in range(N):
  for j in range(N):
    if A[i]%A[j]==0:
      B.append(i)
C=([x for x in set(B) if B.count(x) < 2])
print(len(C))

Submission status: Runtime Error

Solution code:
import heapq

n, q = map(int, input().split())
children = []  # (-レート, 幼稚園番号)
schools = [[] for _ in range(200000)]  # [(-レート, 子供番号)]
strongests = []  # (+レート, 幼稚園番号)

for i in range(n):
    a, b = map(int, input().split())
    b -= 1
    children.append((-a, b))
    schools[b].append((-a, i))

for i, school in enumerate(schools):
    if len(school) > 0:
        heapq.heapify(school)
        strongests.append((-school[0][0], i))
heapq.heapify(strongests)

for _ in range(q):
    c, d = map(int, input().split())
    c -= 1
    d -= 1
    org_school = children[c][1]
    children[c] = (children[c][0], d)

    while True:
        if len(schools[org_school]) == 0:
            break
        if children[schools[org_school][0][1]][1] == org_school:
            break
        else:
            heapq.heappop(schools[org_school])
    if len(schools[org_school]) > 0:
        heapq.heappush(strongests, (-schools[org_school][0][0], org_school))

    heapq.heappush(schools[d], (children[c][0], c))
    heapq.heappush(strongests, (-schools[d][0][0], d))

    while True:
        if len(schools[strongests[0][1]]) == 0 or strongests[0][0] != -schools[strongests[0][1]][0][0]:
            heapq.heappop(strongests)
        else:
            print(strongests[0][0])
            break

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))

import sympy

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

Ai = []
count = 0
for i in range(N):
    Ai = make_divisors(A[i])
    for j in range(len(Ai)):
        if Ai[j] in A and Ai[j] != A[i]:
            count += 1
            break

print(N - count)

Submission status: Runtime Error

Solution code:
def run(x, n, num_array):
    '''
    '''
    if len(num_array) == 0:
        print(x)
        return
    
    i = 0
    while True:
        if x - i not in num_array:
            print(x - i)
            return
        elif x + i not in num_array:
            print(x + i)
            return
        i += 1
        

if __name__ == '__main__':
    x, n = list(map(int, input().split()))
    num_array = list(map(int, input().split()))
    run(x, n, num_array)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
for i in range(a):
  for j in range(b):
   if i+j==a and i*2+4*j==b:
    print("Yes")
    break
   else:
     print("No")

Submission status: Runtime Error

Solution code:
def run(x, n, num_array):
    '''
    '''
    if len(num_array) == 0:
        print(x)
        return
    
    i = 1
    while True:
        if x - i not in num_array:
            print(x - i)
            return
        if x + i not in num_array:
            print(x + i)
            return
        i += 1
        

if __name__ == '__main__':
    x, n = list(map(int, input().split()))
    num_array = list(map(int, input().split()))
    run(x, n, num_array)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
for i in range(a):
  for j in range(b):
   if i+j=a and i*2+4*j=b:
    print("Yes")
     break
   else:
     print("No")

Submission status: Runtime Error

Solution code:
def run(x, n, num_array):
    '''
    '''
    if len(num_array) == 0:
        print(x)
        return
    
    i = 1
    while True:
        if x - i not in num_array:
            print(x - i)
            print('x-i: x={}, i={}'.format(x, i))
            return
        if x + i not in num_array:
            print(x + i)
            return
        i += 1
        

if __name__ == '__main__':
    x, n = list(map(int, input().split()))
    num_array = list(map(int, input().split()))
    run(x, n, num_array)

Submission status: Runtime Error

Solution code:
a=[]
a=int(input().split())
for i in range(4):
 if a[i]==0:
  print(i)
 else:
  pass

Submission status: Runtime Error

Solution code:
a=int(input().split())
for i in range(4):
 if a[i]==0:
  print(i)
 else:
  pass

Submission status: Runtime Error

Solution code:
a=int(input().split())
for i in range(4):
 if a[i]==0:
  print(i)
 else
  pass

Submission status: Runtime Error

Solution code:
N = int(input())
nums = list(map(int, input().split()))
nums.sort()

# 解説の通りに実装
num_max = nums[-1]
exist_counts = [0] * (num_max + 1)
for num in nums:
  # すでにcountされてる場合、重複であることだけ残して抜ける
  if exist_counts[num]:
    exist_counts[num] = 2
    continue
  # はじめてのcountであれば、自分自身とその倍数にチェックをつける
  idx = num
  while idx < num_max:
    exist_counts[idx] += 1
    idx += num

# 各numについて、count=1ならば条件を満たしたということ
count = 0
for num in nums:
  if exist_counts[num] == 1:
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
X, N = list(map(int, input().split()))
if N > 0:
    p = list(map(int, input().split()))
else:
    print(X)
    
y = list(range(1, 101))
for i in range(N):
    if p[i] in y:
        y.remove(p[i])
        
new_y = []
for i in range(len(y)):
    new_y.append(abs(y[i]-X))


print(y[new_y.index(min(new_y))])

Submission status: Runtime Error

Solution code:
a=[]
a=int(input().split())
for i in a:
 if a[i]==0:
   print(i+1)
 else:
  pass

Submission status: Runtime Error

Solution code:
a=[]
a=map(int, input().split())
for i in a:
 if a[i]==0:
   print(i)
 else:
  pass

Submission status: Runtime Error

Solution code:
a=[]
a=map(int, input().stlip())
for i in a:
 if a[i]==0:
   print(i)
 else:
  pass

Submission status: Runtime Error

Solution code:
import sys
X, N = map(int, input().split())

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

lis = []
for i in range (-100,102,1):
    if i not in P:
        lis.append(i)


        
        
        
ans = 10**18
suzi = 0
lis2 = []
for j in lis:
    num = abs(X-j)
    if num < ans:
        ans = num
        suzi = j

print(suzi)

Submission status: Runtime Error

Solution code:
x = list(map(int, input().split(" ")))
ans = 0
for i in range(5):
	if x[i] == 0:
    	ans = i + 1
        
print(ans)

Submission status: Runtime Error

Solution code:
n = 5
Si = n(n+1)/2
lst = list(map(int,input().split()))
Sr = sum(lst)
print(Si-Sr)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
A.sort()
max_a=A[-1]
dp=[True]*(max_a+1)
ans=0
for i in range(N):
  a=A[i]
  #print(a)
  if dp[a]==True: 
    if i==N-1:
      ans+=1
    elif a!=A[i+1]:
      ans+=1   
    k=a
    while k<=max_a:
      dp[k]=False    
      k+=a
print(ans)

Submission status: Runtime Error

Solution code:
X = list(map(int, input().split()))
2
3 if X[0] == 0:
4 print(1)
5 elif X[1] == 0:
6 print(2)
7 elif X[2] == 0:
8 print(3)
9 elif X[3] == 0:
10 print(4)
11 else:
12 print(5

Submission status: Runtime Error

Solution code:
x = list(map(int, input().split()))
for i in range(len(x)):
  if x[i] == 0:
    print(x + 1)

Submission status: Runtime Error

Solution code:
x = int(input())
y = list(map(int, input().split()))

y.sort()
ans = [bool(a+1) for a in range(x)]

for i in range(x-1):
    if ans[i] == True:
        if y[i] == y[i+1]:
            ans[i] = False
        for j in range(i+1 ,x):
            if (ans[j] == True) and (y[j]%y[i]==0):
                ans[j] = False

print(sum(ans))

Submission status: Runtime Error

Solution code:
x = list(map(int,input().split()))
for i in x:
  if x[i] == 0:
    print(i+1)

Submission status: Runtime Error

Solution code:
num_str=input()
num_list=num_str.split(" ")
for i,v in enumerate(num_list):
  if i !=v:
    return i

Submission status: Runtime Error

Solution code:
import sys

a = sys.stdin.read()
for i, v in enumerate(map(int, a.split), 1):
  if v == 0:
    print(i)
    break

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a, b, c, d, e = map(int, input().split())

suuji_list = ["", a, b, c, d, e]

print(list.index(0))

Submission status: Runtime Error

Solution code:
a = input()
x = int(a)

for i, k in x:
  if k == 0:
    print(i)
    break;

Submission status: Runtime Error

Solution code:
import numpy as np
a,b,c,d,e=map(int, input().split())
t = np.array([a,b,c,d,e])
index = np.where(t == 0)
print(index + 1)

Submission status: Runtime Error

Solution code:
import sys
a = map(int, sys.stdin.readline().rstrip().split(' '))

for i in range(len(a)):
  if a[i] == 0:
    print(i+1)
    break

Submission status: Runtime Error

Solution code:
X, Y = map(int, input().split())

for i in range(X+1):
    foot=i*2+(X-i)*4
    if foot==Y:
        print('Yes')
        exit()

print('No')

Submission status: Runtime Error

Solution code:
X,Y = map(int, input().split())
if Y%2==1:
    print('No')
else:
    kame=Y//4
    Y=Y-(kame*4)
    turu=Y//2
    if (turu+kame)==X:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
X,Y = map(int, input().split())
if Y%2==1:
    print("No")
else:
    kame=Y//4
    Y=Y-(kame*4)
    turu=Y//2
    if (turu+kame)==X:
        print("Yes")
    else:
        print('No')

Submission status: Runtime Error

Solution code:
x = list(map(int, input().split()))
y = set(map(int, input().split()))

if x[1] == 0:
    min = x[0]
else:
    for i in range(1, x[1]):
        if set() == {x[0]-i}&y:
            print(x[0]-i)
            exit()
        elif set() == {x[0]+i}&y:
            print(x[0]+i)
            exit()

Submission status: Runtime Error

Solution code:
def main():
  input_number=list(map(int, input().split()))
  for i in input:
    if i==0:
      print(i)
      break

if __name__=='__main__':
  main()

Submission status: Runtime Error

Solution code:
x1=1,x2=2,x=3,x=4,x=5

x2=0

if x1==0:
  print(x1)
elif x2==0:
  print(x2)
elif x3==0:
  print(x3)
elif x4==0:
  print(x4)
elif x5==0:
  print(x5)

Submission status: Runtime Error

Solution code:
x=[1,2,3,4,5]

x[1]=0

for i in x:
  if x[i]==0:
    print(i)

Submission status: Runtime Error

Solution code:
x=[1,2,3,4,5]

x[1]=0

for i in x:
  if x[i]=0:
    print(i)

Submission status: Runtime Error

Solution code:
num = list(map(int, input().split()))
count = 0
for i in num:
  if i = 0:
    count += 1
    print(count)
  else:
    count += 1

Submission status: Runtime Error

Solution code:
A = list(map(int, input().split()))
k = A.find(0)
print(k+1)

Submission status: Runtime Error

Solution code:
;

Submission status: Runtime Error

Solution code:
length=int(input())
list=list(map(int,input().split()))
list.sort()
max=list[-1]
dp=[True]*(max+1)
ret=0
for num in list:
    if dp[num]:
        if list.count(num)!=1:
            dp[num]=False
        else:
            ret=ret+1
            i=2
            num2=num*i
            while num2<max+1:
                if num2 in list:
                    dp[num2]=False
                i=i+1
                num2=num*i
print(ret)