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:
n=int(input())
a=list(map(int,input().split()))
a.sort()
M = a[-1]+1
t=[True]*M


for i in a:
    if t[i] == False:
        continue
    if a.count(i)>1:
        t[i] = False
    for j in range(2*i,M,i):
        t[j] = False
ans = 0
for k in a:
    if t[k] == True:
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
M = max(a)+1
t=[True]*M
a.sort()

for i in a:
    if t[i] == False:
        continue
    if a.count(i)>1:
        t[i] = False
    for j in range(2*i,M,i):
        t[j] = False
ans = 0
for k in a:
    if t[k] == True:
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
input=[input().split() for i in range(2)]
length=int(input[0][0])
list=[]
for i in range(length):
    list.append(int(input[1][i]))
ret=0
list.sort()
for i in range(length):
    flg=True
    num=list[i]
    if list.count(num)==1:
        for j in range(i):
            if i!=j and num%list[j]==0:
                flg=False
                break
        if flg:
            ret=ret+1
print(ret)

Submission status: Runtime Error

Solution code:
input=[input().split() for i in range(2)]
length=int(input[0][0])
list=[]
for i in range(length):
    list.append(int(input[1][i]))
ret=0
list.sort()
for i in range(length):
    flg=True
    num=list[i]
    if list.count(num)==1:
        for j in range(i+1):
            if i!=j and num%list[j]==0:
                flg=False
                break
        if flg:
            ret=ret+1
print(ret)

Submission status: Runtime Error

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

ans = "No"

for a in range(x + 1):
  b = x - a
  if (2 * a + 4 * b ) == y:
    ans = "Yes"
    break

print (ans)

Submission status: Runtime Error

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

a = y / 2
b = 0
while (a + b) != x:
  a -= 2
  b += 1
  if a < 0: break

s = 2 * a + 4 * b
if s == y and a >= 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a = input().split(" ")
total = 0
for i in a:
  total += int(i)
return len(a) * (len(a) + 1) / 2 - total

Submission status: Runtime Error

Solution code:
nums = [int(x) for x in input()]

for i in range(5):
    if nums[i] == 0:
        print(i + 1)
        exit(0)

Submission status: Runtime Error

Solution code:
#! /usr/bin/env pyhton3

lst=[]
z = 0
index=0
inedx2=0
counterplus=1
counterminus=1
x = int(input())
n = int(input())

while z < n:
    s =int( input())
    lst.append(s);
    z+=1
if n == 0:
    print(x)

for i in lst:
    index = x + counterplus
    index2 = x - counterminus
    if index in lst:
        counterplus +=1
    if index2 in lst:
        counterminus +=1
    
    if counterplus < counterminus:
        index= x + counterplus
        break
    else:
        index = x - counterminus
        break


print(index)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np


def getNearestValue(list, num):
    """
    概要: リストからある値に最も近い値を返却する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return list[idx]


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


listHandred = []
for i in range(0,102):
    listHandred.append(i)
    
ansList = listHandred

for i in list:
    if i in ansList:
        ansList.remove(i)

print(getNearestValue(ansList,X))

Submission status: Runtime Error

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

x = s.index(0)
print(x + 1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def main():
    if 0<=(y/2 -x)<=x:
        if y==0 or x==0:
            return 'No'
        if (y/2 -x)%1==0:
            return('Yes')
        else:
            return('No')
    else:
        return('No')
print(main())

Submission status: Runtime Error

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

for i range(5):
  if arr[i]==0:
    print(i+1)

Submission status: Runtime Error

Solution code:
L=[int(x) for x in input().split(" ")
print(L.index(0)+1)

Submission status: Runtime Error

Solution code:
x=ilist(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)
elif x[4] ==0:
  print(5)

Submission status: Runtime Error

Solution code:
import sys

input = sys.stdin.readline

A=[int(input()) for _ in range(5)]

for i,a in enumerate(A):
  if a == 0:
    print(i)
    break

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if(b%2!=0):
    print("No")
else:
    z = b//2 
    y = b//4
    if(a>=y and a <=z):
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
rint(15 - sum(list(map(int, input().split()))))

Submission status: Runtime Error

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

if x*4<y:
    print("No")

elif y/2<x:
    print ("No")

elif y % 2 == 0:
    print("Yes")

else:
    print("No")

Submission status: Runtime Error

Solution code:
x, n = map(int, input().split())
P = list(map(int, input().split()))
diff, ans = 1000, -1
for i in range(0, 102):
    if (P.count(i)):
        continue
    if (abs(i - x) < diff):
        diff = abs(i - x)
        ans = i
print(ans)

Submission status: Runtime Error

Solution code:
A = list[map(int, input().split())]
count = 0
for a in A:
  count += 1
  if a == 0:
    print(count)
    exit()

Submission status: Runtime Error

Solution code:
lst = []

for i in range (5):
    element = int(input())
    lst.append(element)

n=lst.index(0)
print(n+1)

Submission status: Runtime Error

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

ans = 'No'
for a in range(X + 1):
	b = X - a
	if 2 * a + 4 * b == Y:
		ans = 'Yes'
        
print(ans)

Submission status: Runtime Error

Solution code:
print(input().split().find('0')+1)

Submission status: Runtime Error

Solution code:
# ABC169A

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

Submission status: Runtime Error

Solution code:
l = list(int, input())

for i in range(5):
  if l[i] == 0:
    print(i+1)
    exit()

Submission status: Runtime Error

Solution code:
S = [int(x) for x in input().split()]
for i in range(5):
	if S[i]==0:
  		print(i+1)
        exit()

Submission status: Runtime Error

Solution code:
S = [int(x) for x in input().split()]
for i in range(5)
	if S[i]==0
  		print(i+1)
        exit()

Submission status: Runtime Error

Solution code:
X,Y= map(int,input().split())
if (Y%2==0 and Y>=2*X and Y<=4*X):
    print('yes')
else:
    print('No')

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,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,Y= map(int,input().split())
b=(Y-2*X)%2
a=(4*X-Y)%2
B=(Y-2*X)/2
A=(4*X-Y)/2
if (b==0 and a==0 and A>=0 and B>=0):
    print('yes')
else:
    print('No')

Submission status: Runtime Error

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

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,Y= map(int,input().split())
A=Y%2
if  A== 0 and 2*X<=Y and Y<=4*X:
    print('yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
X,Y = map(int,input().split())
if ((Y-2*X)%2) ==0 and ((4*X-Y)%2) ==0 and ((4*X-Y)/2)>=0 and ((Y-2*X))/2:
    print('yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
X,Y= map(int,input().split())
b=(Y-2*X)%2
a=(4*X-Y)%2
B=(Y-2*X)/2
A=(4*X-Y)/2
if b==0 and a==0 and A=>0 and B=>0:
    print('yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
X,Y= map(int,input().split())
b=(Y-2*X)%2
a=(4*X-Y)%2
B=(Y-2*X)/2
A=(4*X-Y)/2
if b==0 and a==0 and A>=0 and B>=0:
    print('yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
ar=[int(x) for x in input().split()]
for i in range(n):
  if(ar[i]==0):
    print((i+1))
    break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
nums = input().split()

if nums[0] == "0":
print(1)

elif nums[1] == "0":
print(2)

elif nums[2] == "0":
print(3)

elif nums[3] == "0":
print(4)

elif nums[4] == "0":
print(5)

Submission status: Runtime Error

Solution code:
nums = input().split()

if nums[0] = "0"
print(1)

elif nums[1] = "0"
print(2)

elif nums[2] = "0"
print(3)

elif nums[3] = "0"
print(4)

elif nums[4] = "0"
print(5)

Submission status: Runtime Error

Solution code:
nums = input().split()

if numlist[0] = "0"
print(1)

elif numlist[1] = "0"
print(2)

elif numlist[2] = "0"
print(3)

elif numlist[3] = "0"
print(4)

elif numlist[4] = "0"
print(5)

Submission status: Runtime Error

Solution code:
nums = input()
numlist = list(nums.split(' '))

if numlist[0] = "0"
print(1)

elif numlist[1] = "0"
print(2)

elif numlist[2] = "0"
print(3)

elif numlist[3] = "0"
print(4)

elif numlist[4] = "0"
print(5)

Submission status: Runtime Error

Solution code:
nums = input()
numlist = list(nums.split(' '))

if numlist[0] = "0"
print(0)

elif numlist[1] = "0"
print(1)

elif numlist[2] = "0"
print(2)

elif numlist[3] = "0"
print(3)

elif numlist[4] = "0"
print(4)

Submission status: Runtime Error

Solution code:
nums = input()
numlist = list(nums.split(' '))

if numlist[0] = "0"
print(0)

if numlist[1] = "0"
print(1)

if numlist[2] = "0"
print(2)

if numlist[3] = "0"
print(3)

if numlist[4] = "0"
print(4)

Submission status: Runtime Error

Solution code:
nums = input()
numlist = list(nums.split(' '))
for i in numlist:
  if i == '0':
    print i

Submission status: Runtime Error

Solution code:
x, n = list(map(int, input().split()))
if not n:
  print(x) 
else:
  l = list(map(int, input().split()))
  dic = {} 
  for ll in l: dic[ll] = 1
  i = 1
  while true:
    if not dic.get(x-i,0):
      print(x-i)
      break
    elif not dic.get(x+i, 0):
      print(x+i) 
      break
    i+=1

Submission status: Runtime Error

Solution code:
from heapq import heapify,heappush,heappop
import sys

N, Q = map(int,input().split())

S = []
PQs = [[] for _ in range(200000)]
T = [0]*200000 #幼稚園ごとの最終更新
M = []
for n in range(N):
  a, b = map(int,input().split())
  S.append([a,b-1])#レート、所属
  #print(PQs[0:10])
  PQs[b-1]=PQs[b-1]+[(-a,n)]#-レート、人
  #print(PQs[0:10])

for b in range(200000):
  if len(PQs[b])>0:
    heapify(PQs[b])
    M.append((-PQs[b][0][0],b,0))#レート、人、所属、更新時
heapify(M)
          
for q in range(1,Q+1):#時刻。1からスタート
  c, d = map(int,input().split())
  d = d-1
  d_prv = S[c-1][1]
  S[c-1][1] = d #情報の更新
  #print(S)
 
  #print(d_prv)
  #print(d)
  
  #転園先の幼稚園について
  heappush(PQs[d],(-S[c-1][0],c-1))#-レート、人
  #print(S[P[d][0][1]][1])
  #print(d)
  #print(PQs[0:4]) 
  while d != S[PQs[d][0][1]][1]:#所属が整合していない時（古く間違った情報である時）
    heappop(PQs[d])
  heappush(M,(-PQs[d][0][0],d,q))
  T[d] = q #最終更新時をアップデート
  #print(PQs[0:4])
  
  #転園元の幼稚園について
  if len(PQs[d_prv])>0:
    while d_prv != S[PQs[d_prv][0][1]][1]:#所属が整合していない時（古く間違った情報である時）
      #print(S[PQs[d_prv][0][1]])
      heappop(PQs[d_prv])
      if len(PQs[d_prv]) == 0:
        break
        
    if len(PQs[d_prv]) > 0:  
      heappush(M,(-PQs[d_prv][0][0],d_prv,q))
    T[d_prv] = q #最終更新時をアップデート

  #print(M)   	
  #最強園児の集いを処理
  while M[0][2] != T[M[0][1]]:#更新時が整合していない時（古く間違った情報である時）
    heappop(M)
    #print(M)
  
  #結果の出力
  print(M[0][0]) 
  #print(M)

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    n = int(input())
    l_a = list(map(int, input().split()))
    s_a = list(set(l_a))

    s_a.sort()

    dub_a = [0]*(max(s_a)+1)

    for i in l_a:
        dub_a[i] += 1

    dp = [1]*(max(s_a)+1)

    for i in s_a:
        if dp[i] == 0:
            pass
        else:
            for j in range(2*i, len(dp), i):
                dp[j] = 0


    count = 0
    for i in s_a:
        if dp[i]==1 and dub_a[i]==1:
            count += 1
    print(count)

Submission status: Runtime Error

Solution code:
from sys import stdin
 
X = stdin.readline().strip().split(" ")
 
n = 0
for i in range(len(X)):
  if X[i] == "0":
    n = i+1
    break
print n

Submission status: Runtime Error

Solution code:
from sys import stdin

X = stdin.readline().strip().split(" ")

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from heapq import *
up=2*10**5
maxi=10**9+1
kind=[[] for i in range(up)]
kind_d=[[] for i in range(up)]

class segtree:
    x_unit=maxi # 要素として入れられる最大値
    x_func=min
    def __init__(self,n):
        self.n=n
        self.x=[self.x_unit]*(2*n)
    def build(self, seq):
        for i,j in enumerate(seq, start=self.n):  # n番目からseqをx配列に移していく
            self.x[i] = j
        for i in range(self.n-1, 0, -1):
            self.x[i] = self.x_func(self.x[i*2], self.x[i*2+1])
            # セグ木トーナメント表の左右を比較
            # 例えばn=8の時、seq[4]はx[12]に、seq[5]はx[13]に入っている
            # さらにx[14]とx[15]の間に来るのはx[7]、x[12]とx[13]の間に来るのはx[6]
            # x_funcに従って値を取得
    def set_val(self,i,j): # 1点更新
        i += self.n
        self.x[i]=j
        while i>1:
            i//=2 # 更新後、木の上へと登っていくついでに更新
            self.x[i]=self.x_func(self.x[i*2], self.x[i*2+1])
    def fold(self,l,r): # 区間[l, r)の最小値などを取得 
        l+=self.n
        r+=self.n
        val_l=self.x_unit
        val_r=self.x_unit
        while l<r:
            if l & 1: # lが奇数
                val_l=self.x_func(val_l,self.x[l])
                l+=1 # 偶数に調節
            if r & 1: # rが奇数
                r-=1 # 開区間なので1個前は偶数番目の要素
                val_r=self.x_func(val_r,self.x[r])
            l //= 2
            r //= 2
        return self.x_func(val_l,val_r)

n,q=map(int, input().split())
shozoku=[-1]*n
rating=[0]*n
for i in range(n):
    a,b=map(int, input().split())
    heappush(kind[b-1],-a)
    shozoku[i]=b-1
    rating[i]=a
#print(kind)
seg=segtree(up)
root=[maxi for i in range(up)]

for i in range(up):
    if kind[i]:
        rate=-heappop(kind[i])
        root[i]=rate
        heappush(kind[i],-rate)
seg.build(root)

for i in range(q):
    c,d=map(int, input().split())
    c-=1
    d-=1
    rc=rating[c]
    sc=shozoku[c]
    if rc==seg.fold(sc,sc+1):
        while kind_d[sc]:
            q1=heappop(kind_d[sc])
            q2=heappop(kind[sc])
            if q1!=q2:
                heappush(kind_d[sc],q1)
                heappush(kind[sc],q2)
                break
        heappop(kind[sc])
        if kind[sc]:
            while kind[sc] and kind_d[sc]:
                q2=heappop(kind[sc])
                q1=heappop(kind_d[sc])
                if q1==q2:
                    continue
                else:
                    seg.set_val(sc, -q2)
                    heappush(kind[sc],q2)
                    heappush(kind_d[sc],q1)
                    break
        if not kind[sc]:
            seg.set_val(sc, maxi)
        else:
            q2=heappop(kind[sc])
            seg.set_val(sc, -q2)
            heappush(kind[sc],q2)
    else:
        heappush(kind_d[sc], -rc)
    heappush(kind[d],-rc)
    new=seg.fold(d,d+1)
    if rc>new or new==maxi:
        seg.set_val(d, rc)
    shozoku[c]=d
    print(seg.x[1])

Submission status: Runtime Error

Solution code:
from heapq import heapify, heappop, heappush
up=2*10**5
maxi=10**9+1
kind=[[] for i in range(up)]
kind_d=[[] for i in range(up)]

class segtree:
    x_unit=maxi # 要素として入れられる最大値
    x_func=min
    def __init__(self,n):
        self.n=n
        self.x=[self.x_unit]*(2*n)
    def build(self, seq):
        for i,j in enumerate(seq, start=self.n):  # n番目からseqをx配列に移していく
            self.x[i] = j
        for i in range(self.n-1, 0, -1):
            self.x[i] = self.x_func(self.x[i*2], self.x[i*2+1])
            # セグ木トーナメント表の左右を比較
            # 例えばn=8の時、seq[4]はx[12]に、seq[5]はx[13]に入っている
            # さらにx[14]とx[15]の間に来るのはx[7]、x[12]とx[13]の間に来るのはx[6]
            # x_funcに従って値を取得
    def set_val(self,i,j): # 1点更新
        i += self.n
        self.x[i]=j
        while i>1:
            i//=2 # 更新後、木の上へと登っていくついでに更新
            self.x[i]=self.x_func(self.x[i*2], self.x[i*2+1])
    def fold(self,l,r): # 区間[l, r)の最小値などを取得 
        l+=self.n
        r+=self.n
        val_l=self.x_unit
        val_r=self.x_unit
        while l<r:
            if l & 1: # lが奇数
                val_l=self.x_func(val_l,self.x[l])
                l+=1 # 偶数に調節
            if r & 1: # rが奇数
                r-=1 # 開区間なので1個前は偶数番目の要素
                val_r=self.x_func(val_r,self.x[r])
            l //= 2
            r //= 2
        return self.x_func(val_l,val_r)

n,q=map(int, input().split())
shozoku=[-1]*n
rating=[0]*n
for i in range(n):
    a,b=map(int, input().split())
    heappush(kind[b-1],-a)
    shozoku[i]=b-1
    rating[i]=a
#print(kind)
seg=segtree(up)
root=[maxi for i in range(up)]

for i in range(up):
    if kind[i]:
        rate=-heappop(kind[i])
        root[i]=rate
        heappush(kind[i],-rate)
seg.build(root)

for i in range(q):
    c,d=map(int, input().split())
    c-=1
    d-=1
    rc=rating[c]
    sc=shozoku[c]
    if rc==seg.fold(sc,sc+1):
        while kind_d[sc]:
            q1=heappop(kind_d[sc])
            q2=heappop(kind[sc])
            if q1!=q2:
                heappush(kind_d[sc],q1)
                heappush(kind[sc],q2)
                break
        heappop(kind[sc])
        if kind[sc]:
            while kind[sc] and kind_d[sc]:
                q2=heappop(kind[sc])
                q1=heappop(kind_d[sc])
                if q1==q2:
                    continue
                else:
                    seg.set_val(sc, -q2)
                    heappush(kind[sc],q2)
                    heappush(kind_d[sc],q1)
                    break
        if not kind[sc]:
            seg.set_val(sc, maxi)
        else:
            q2=heappop(kind[sc])
            seg.set_val(sc, -q2)
            heappush(kind[sc],q2)
    else:
        heappush(kind_d[sc], -rc)
    heappush(kind[d],-rc)
    new=seg.fold(d,d+1)
    if rc>new or new==maxi:
        seg.set_val(d, rc)
    shozoku[c]=d
    print(seg.x[1])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = []
z = 1
while z != 6:
	print("Enter number"+z,":")
	x.append(input())
	z+=1
y = 0
for i in x:
	if x[y] == "0":
		print(y+1)
	else:
		print("1")
	y +=1

Submission status: Runtime Error

Solution code:
lst = []
for i in range(int(5)):
    lst.append(int(input()))
#print(lst)
    
for i in range(len(lst)):
    if(lst[i]==0):
        ans = i
        break
print(ans+1)

Submission status: Runtime Error

Solution code:
def main():
  N=int(input())
  D=[0]*(10**6+1)

  for a in sorted(map(int,input().split())):
    if D[a]==0:
      D[a]=1
      for i in range(2*a,10**6+1,a):
        D[i]=-1
    else:
      D[a]=-1

  print(D.count(1))

main()

Submission status: Runtime Error

Solution code:
n=int(input())
l=list(map(int,input().split()))
l.sort()
sum=1#個数
if l[0]==l[1]:
  sum=0
for j in range(1,n):
  i=1
  for m in range(0,j):
    if l[j]%l[m]==0:
      i=0
      break
  sum+=i
    
print(sum)

Submission status: Runtime Error

Solution code:
0 2 3 4 5

Submission status: Runtime Error

Solution code:
a=input()
a=a.split()

n=1

for x in a:
  if n==int(x):
    n=n+1
  else:
    print(n)
    end

Submission status: Runtime Error

Solution code:
#X匹Y本の組み合わせが存在するか判定。鶴の数を基準に連立方程式を解いて、鶴の数が正の整数であればYES
X,Y = map(int,input().split())
a = (4 * X - Y) / 2
if a.is_integer() and 0 <= a:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
z = 1
x = []
while z != 5:
  x.append[input()]
  z+=
y = 0
while y!= 5:
  if x[y] == 0:
    print(y+1)
  else:
    y+=1
    continue

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
for i in range (1,6):
  if(x(i) == 0):
    print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# https://qiita.com/c-yan/items/e117269cc447fa61dddf
N = int(input())
A = list(map(int, input().split()))

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

A = sorted(set(A))
t = [True] * (10 ** 6 + 1)
for a in A:
    if d[a] > 1:
        t[a] = False
    for i in range(a + a, 10 ** 6 + 1, a):
        t[i] = False
print(sum(1 for a in A if t[a]))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# 解説を見ながら
N = int(input())
A = list(map(int,input().split()))

# リストを作って，Amaxまでの数字について，aiの約数ならば足す，最終的には，要素が１のやつが求めるもの
# 一回検討した要素はsetに入れて次出たときは使わないようにする
import numpy as np
#L = np.zeros((10**6+10,))
A.sort()
MAX=10**6+1
L = [0]*MAX
used = set()
first = True
for a in A:
    if L[a] ==2:
        continue
    if a in used and first:
        first = False
        for i in range(0,MAX,a):
            L[i] = 2
        # L[::a] += 1　要素アクセスだから遅くなった?
        continue
    used.add(a)
    # L[1:][::a] += 1こういう書き方はリストではできないので注意
    L[a] = 1
    for i in range(2*a,MAX,a):
        L[i] = 2
    #L[::a] += 1
count = 0
for a in A:
    if L[a] == 1:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
#

import sys
from collections import deque
input=sys.stdin.readline

def main():
    H,W,K=map(int,input().split())
    x1,y1,x2,y2=map(int,input().split())
    x1-=1
    y1-=1
    x2-=1
    y2-=1
    mas=[list(input()) for i in range(H)]
    dist=[[-1]*W for i in range(H)]
    qu=deque([(x1,y1)])
    dist[x1][y1]=0
    qup=qu.popleft
    qua=qu.append
    d=((-1,0),(1,0),(0,-1),(0,1))
    while(len(qu)>0):
        v=qup()
        for di in d:
            for i in range(1,K+1):
                nvh=v[0]+i*di[0]
                nvw=v[1]+i*di[1]
                if nvh<0 or nvh>=H or nvw<0 or nvw>=W or mas[nvh][nvw]=="@":
                    break
                if dist[nvh][nvw]==-1:
                    dist[nvh][nvw]=dist[v[0]][v[1]]+1
                    qua((nvh,nvw))
    print(dist[x2][y2])
    
if __name__=="__main__":
    main()

Submission status: Runtime Error

Solution code:
h, w, k = map(int, input().split())
x1, y1, x2, y2 = map(int, input().split())
x1, y1, x2, y2 = x1-1, y1-1, x2-1, y2-1

m = [[-1] * w for _ in range(h)]
for hh in range(h):
    c = input()
    for ww, cc in enumerate(c):
        if cc == '.':
            m[hh][ww] = h*w

from collections import deque
q = deque()

q.append((0, x1, y1))
while q:
    s, x, y = q.popleft()

    for i in range(1, k+1):
        xx, yy = x + i, y
        if xx >= h or m[xx][yy] == -1:
            break
        if m[xx][yy] <= s+1:
            continue
        if xx == x2 and yy == y2:
            print(s+1)
            exit(0)
        m[xx][yy] = s+1
        q.append((s+1, xx, yy))

    for i in range(1, k+1):
        xx, yy = x - i, y
        if xx < 0 or m[xx][yy] == -1:
            break
        if m[xx][yy] <= s+1:
            continue
        if xx == x2 and yy == y2:
            print(s+1)
            exit(0)
        m[xx][yy] = s+1
        q.append((s+1, xx, yy))

    for i in range(1, k+1):
        xx, yy = x, y + i
        if yy >= w or m[xx][yy] == -1:
            break
        if m[xx][yy] <= s+1:
            continue
        if xx == x2 and yy == y2:
            print(s+1)
            exit(0)
        m[xx][yy] = s+1
        q.append((s+1, xx, yy))

    for i in range(1, k+1):
        xx, yy = x, y - i
        if yy < 0 or m[xx][yy] == -1:
            break
        if m[xx][yy] <= s+1:
            continue
        if xx == x2 and yy == y2:
            print(s+1)
            exit(0)
        m[xx][yy] = s+1
        q.append((s+1, xx, yy))

print(-1)

Submission status: Runtime Error

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

for i in range(len(l)):
  if l[i] == 0:
    return i

Submission status: Runtime Error

Solution code:
num = []
for i in range(5):
	num.append(int(input()))
for i in range(5):
	if (num[i] == 0):
		print(str(i + 1))
print

Submission status: Runtime Error

Solution code:
num = []
for i in range(5):
	num.append(int(input()))
for i in range(5):
	if (num[i] == 0):
		print(str(i + 1))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if 2*a<=b and b<=4*a and b%2==0:
  print('yes')
else:print('no')

Submission status: Runtime Error

Solution code:
for i in range (1,6):
  print(i)
  int x
  if(x(i) == 0):
    print(i)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#include <random>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int v[5];
	for (int i = 0; i < 5; i++) cin >> v[i];
	for (int i = 0; i < 5; i++) 
		if (v[i] == 0) {
			cout << i + 1;
			break;
		}
	return 0;
}

Submission status: Runtime Error

Solution code:
import numpy as np

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

A.sort()
e = np.zeros(10**6 + 1)
ans = 0
for i in range(N):
    if e[A[i]] == 0:
        e[::A[i]] = 1 # スライスで倍数indexを一気に変更できる。すごい。
        # 同じ値が重複していないか判定
        if A[i] != A[i+1]:
            ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
x = []
i = 0
j = 0
while i < 5:
    x.append(input())
    i += 1
print(x)
while j < 5:
    if 0 == int(x[j]):
        print(j + 1)
    j += 1

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
# coding: utf-8
# 日本語を入力できるようにするために上記一文が必要


x, y = map(int, input().split())
if y > 4*x or  2*x >y:
        print("No")
elif (4*x - y) % 2 == 0:
        print("Yes")
else:
        print("No")

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
x = inpl()
for i in range(5):
    if x[i] == 0:
        print(i+1)
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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