Problem:


Score : 100 points

Problem Statement

Given is an integer N.

Takahashi chooses an integer a from the positive integers not greater than N with equal probability.

Find the probability that a is odd.

Constraints

1 \leq N \leq 100

Input

Input is given from Standard Input in the following format:

N

Output

Print the probability that a is odd.
Your output will be considered correct when its absolute or relative error from the judge's output is at most 10^{-6}.

Sample Input 1

4

Sample Output 1

0.5000000000

There are four positive integers not greater than 4: 1, 2, 3, and 4. Among them, we have two odd numbers: 1 and 3. Thus, the answer is \frac{2}{4} = 0.5.

Sample Input 2

5

Sample Output 2

0.6000000000

Sample Input 3

1

Sample Output 3

1.0000000000



Sample input:
4


Sample output:
0.5000000000

Submission status: Runtime Error

Solution code:
import math 

A, B = map(int, input().split())

def sieve_of_eratosthenes(n): 
    candidate = [i for i in range(2, n+1)] 
    prime = []
    limit = math.sqrt(n) + 1 

    while True:
        p = min(candidate) 
        if limit <= p:
            prime.extend(candidate) 
            break
        prime.append(p) 

        candidate = [i for i in candidate if i % p != 0]

    return prime

def divisor(n): #nの約数を全て求める
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    
    return list(set(table))
  
ma = max(A, B)
mi = min(A, B)

yakusu = [d for d in divisor(mi) if ma % d == 0]

yakumax = max(yakusu)
if yakumax == 1:
	prime = [1]
elif yakumax == 2:
  prime = [1, 2]
else:
  prime = sieve_of_eratosthenes(500)
  prime.append(1)

c = 0
for y in yakusu:
  if y in prime:
    c += 1

if A == B:
  print(1)
else:
  print (c)

Submission status: Runtime Error

Solution code:
import numpy as np
def so(n):
    for i in range(3, int(np.sqrt(n)) + 1, 2):
        if n % i == 0:
            return False
    return True
A, B = map(int, input().split())
M = np.min([A, B])
n = 1
if (A % 2 == 0) and (B % 2 == 0):
    n = 2
for i in range(3, M, 2):
    if so(i):
        if (A % i == 0) and (B % i == 0):
            n = n + 1
print(n)

Submission status: Runtime Error

Solution code:
import itertools
import math 

a,b = map(int,input().split())

def divisor(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors


def is_prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1
"""
if is_prime(a) and is_prime(b):
    print(1)
    import sys
    sys.exit()
"""

a_L = divisor(a)
b_L = divisor(b)

kouyaku = set(a_L) & set(b_L)

new_L = []


for val in kouyaku:
    if is_prime(val):
        new_L.append(val)


new_L.append(1)
print(len(new_L))

Submission status: Runtime Error

Solution code:
import math

A,B=map(int, input().split())

def gcd(a,b):
    while b!=0:
        a,b = b,a%b
    return a

def primelist(n):
    P = [2]
    flag = 0
    for i in range(3,n+1,2):
        for j in range(len(P)):
            if math.sqrt(i) < P[j]:
                break
            else:
                if i%P[j] == 0:
                    flag += 1
                    break
        if flag == 0:
            P.append(i)
        flag = 0
    P.append(1)
    return(P)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr[-1][0]

N=gcd(A,B)

if N==1:
    print(1)
else:
    ms = factorization(N)
    pl = primelist(ms)
    ans=0
    for i in range(len(pl)):
        if N%pl[i]==0:
            ans+=1
    print(ans)

Submission status: Runtime Error

Solution code:
[N, K] = list(map(int, input().split()))
h = list(map(int, input().split()))
count = 0

for i in range(N):
    
    if h[i - 1] >= K:
      count = count + 1

print(count)

Submission status: Runtime Error

Solution code:
import numpy as np
n=int(input())
a=np.sort(np.array(input().split(" "),dtype="int32"))
a_=list(a[:])
for i in a:
	print(a_.index(i)+1,end=" ")

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
h = list(map(int,input().split()))
a = 0

for i in range(n):
  if h[i] >= k:
    a += 1
print(a)

Submission status: Runtime Error

Solution code:
print(1/int(input))

Submission status: Runtime Error

Solution code:
import sys

input = sys.stdin.readline
A, B = map(int, input().split())


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            while temp%i==0:
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


af = factorization(A)
bf = factorization(B)
ans = 1
for afi in af:
    if afi in bf:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
a = list(map(int, input().split()))
x=[]
for i in range(1,n+1):
    for t in range(n):
        if a[t]==i:
            num=t+1
            x.append(num)
for q in x:
    print(q,end=" ")

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int, input().split()))
for i in range(1, n+1):
  print(h.index(i)+1, end =  " ")

Submission status: Runtime Error

Solution code:
N, K = input().split()
l = list(int(i) for i int input().split())
count = 0
 
for i in l:
  if(i > K):
    count = count + 1

print(count)

Submission status: Runtime Error

Solution code:
s = raw_input().split()
[N, K] = s
N = int(N)
K = int(K)
#print N, K

s = raw_input().split()
#print s
h = [0]*N

for i in range(N):
    h[i] = int(s[i])
    #print h[i]

h.sort(reverse=True)
#print h

for i in range(N):
    if (h[i] >= K):
        continue
    else:
        print i
        exit()

print N

Submission status: Runtime Error

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

import math


def dv(x1, x2):
    ret = []
    v = int(math.sqrt(min(x1, x2))) + 1

    check = [0] * (v + 1)

    for n in range(2, v):
        if check[n] == 1:
            continue

        if x1 % n == 0 and x2 % n == 0:
            ret.append(n)

            cnt = 1
            while n * cnt <= v:
                check[n * cnt] = 1
                cnt += 1

    return ret


cf = [1] + dv(A, B)
print(len(cf))

Submission status: Runtime Error

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

divisors = []
for i in range(1, min(A,B) + 1):
	if A % i == 0 and B % i == 0:
		divisors.append(i)


done = {}
def is_coprime(a,b):
	if (a,b) in done:
		return done[a,b]
	if b == 1:
		return True
	for i in range(2, min(A,B)):
		if a % i == 0 and b % i == 0:
			done[(a,b)] = False
			return False
	done[(a,b)] = True
	return True


def getMaxLen(sofar, divisors):
	if len(divisors) == 0:
		return len(sofar)
	curr_max = getMaxLen(sofar,divisors[1:])
	for i in range(len(divisors)):
		d = divisors[i]
		flag = False
		for s in sofar:
			if not is_coprime(d,s):
				flag = True
				break
		if flag:
			continue
		new = sofar.copy()
		
		new.append(d)
		curr_max = max(curr_max, getMaxLen(new, divisors[i+1:]))
	return curr_max

print(getMaxLen([], divisors))

Submission status: Runtime Error

Solution code:
n= int(input())
a_list=list(map(int,input().split()))
f_list=[0]*n

for i in a_list:
  f_list[i-1]= a_list.index(i)+1

print(n)
for i in f_list:
    print(i,end=' ')
print('')

Submission status: Runtime Error

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

for i in range(N):
  print(str(A.index(i+1)+1), end=" ")

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
b = list()
for i in range(n+1):
    if i==0:
        continue
    else:
        c = a.index(i)
        c = c+1
        b.append(c)
for j in b:       
    print(j,end=' ')

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
b = list()
for i in range(n+1):
    if i==0:
        continue
    else:
        c = a.index(i)
        c = c+1
        b.append(c)
for j in b:       
    print(j,end=' ')

Submission status: Runtime Error

Solution code:
from sympy import nextprime
A,B = list(map(int,input().split()))
 
aaa = []
 
for i in range(1,min(A,B)):
    if A%i == 0 and B%i == 0:
        aaa.append(i)
        
count = 0
 
for i in range(len(aaa)):
    if isprime(aaa[i]) == True:
        count += 1
        
print(count+1)

Submission status: Runtime Error

Solution code:
N, A = int(input()), list(map(int, input().split()))
X=[]
for i in range(1, N+1):
  P = A.index(i) + 1
  X.append(P)
print(' '.join([str(x) for x in X]))

Submission status: Runtime Error

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

divisors = []
for i in range(1, min(A,B) + 1):
	if A % i == 0 and B % i == 0:
		divisors.append(i)

def is_coprime(a,b):
	for i in range(2, min(A,B)):
		if a % i == 0 and b % i == 0:
			return False
	return True

def getMaxLen(sofar, divisors):
	if len(divisors) == 0:
		return len(sofar)
	curr_max = getMaxLen(sofar,divisors[1:])
	for i in range(len(divisors)):
		d = divisors[i]
		flag = False
		for s in sofar:
			if not is_coprime(d,s):
				flag = True
				break
		if flag:
			continue
		new = sofar.copy()
		
		new.append(d)
		curr_max = max(curr_max, getMaxLen(new, divisors[i+1:]))
	return curr_max

print(getMaxLen([], divisors))

Submission status: Runtime Error

Solution code:
#l=list(map(int, input().split()))
a,b=map(int, input().split())
#l=list(map(int, input().split()))
#n = int(input())
def divisor(n): #nの約数を全て求める
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

def cf(x1,x2):
    cf =[]
    cf.append(1)
    for i in range(2, min(x1,x2)+1):
        if x1 %i == 0 and x2 % i == 0:
            cf.append(i)
    return cf

def is_prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1

ans = 1
temp1 = divisor(a)
temp2 = divisor(b)
hoge = []
if len(temp1) < len(temp2):
    hoge = temp1
    hoge2 = temp2
else:
    hoge = temp2
    hoge2 = temp1

temp = []
for i in hoge:
    if i in hoge2:
        temp.append(i)

#print (temp)
for i in temp:
    if is_prime(i):
        ans += 1

print (ans)

Submission status: Runtime Error

Solution code:
number =int(input())
orders =input().rstrip().split(" ")
studentnumbers =[]

for j in range(number):
  for i in range(len(orders)):
    if int(orders[i])==j+1:
      studentnumbers.append(i+1)
      print(i+1 ,end=" ")

Submission status: Runtime Error

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

shusseki_jun=[' ' for _ in range(N)]
for i in range(N):
    ind = A[i]
    shusseki_jun[int(ind)-1] = str(i+1)

print(' '.join(shusseki_jun))

Submission status: Runtime Error

Solution code:
import math 

A, B = map(int, input().split())

def sieve_of_eratosthenes(n): 
    candidate = [i for i in range(2, n+1)] 
    prime = []
    limit = math.sqrt(n) + 1 

    while True:
        p = min(candidate) 
        if limit <= p:
            prime.extend(candidate) 
            break
        prime.append(p) 

        candidate = [i for i in candidate if i % p != 0]

    return prime

def divisor(n): #nの約数を全て求める
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    
    return list(set(table))
  
ma = max(A, B)
mi = min(A, B)

yakusu = [d for d in divisor(mi) if ma % d == 0]

yakumax = max(yakusu)
if yakumax == 1:
	prime = [1]
elif yakumax == 2:
  prime = [1, 2]
else:
  prime = sieve_of_eratosthenes(yakumax)
  prime.append(1)

c = 0
for y in yakusu:
  if y in prime:
    c += 1
    
print (c)

Submission status: Runtime Error

Solution code:
n=int(input())
a=(n-1)//2
print a/n

Submission status: Runtime Error

Solution code:
while True:
  N = input()
  if N < 0 | 100 < N
  	break

if N == 1:
  print(N)
  elif N%2 == 0:
    print((N / 2) / N)
    else:
      print((int(N / 2) + 1) / N)

Submission status: Runtime Error

Solution code:
a=input().split(' ')
b=int(a[0])
c=int(a[1])
data=input().split(' ')
data_1=0
data_2=0
for i in range(b):
	data_1=int(data[i])
	if data_1 >= c:
		data_2=data_2+1
	else:
		pass
print(data_2)

Submission status: Runtime Error

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

shusseki_jun=['' for _ in range(N)]
for i in range(N):
    shusseki_jun[i] = str(A.index(str(i+1))+1)
print(' '.join(shusseki_jun))

Submission status: Runtime Error

Solution code:
while True:
  N = input()
  if N < 0 | 100 < N
  	break

if N == 1:
  print(N)
  elif N%2 == 0:
    print((N / 2) / N)
    else:
      print((int(N / 2) + 1) / N)

Submission status: Runtime Error

Solution code:
N = input()
if N % 2 == 0:
    A = (N/2)/N
    print(float(A))
else:
    B = ((N+1)/2)/N
    print(float(B))

Submission status: Runtime Error

Solution code:
import math

A, B = map(int,input().split())

def soinsu(test):
    list_sosu = []
    x = 0
    while x==0:
        for i in range(2,test+1):
            if i > math.sqrt(test):
                list_sosu.append(test)
                x = 1
                break
            elif test % i == 0:
                test = int(test/i)
                if test == 1:
                    x = 1
                list_sosu.append(i)
                break
    return set(list_sosu)

if A == 1 or B == 1:
    print(1)
    
else:
    print(len(soinsu(A)&soinsu(B))+1)

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

hh = np.full(N, np.nan)
for i, j in stu:
    hh[j-1] = i
    print(int(hh[j-1]))

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

hh = np.full(N, np.nan)
for i, j in stu:
    hh[j-1] = i
    
for i in hh:
  print(i)

Submission status: Runtime Error

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

#print(x,y)

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
x_li=(make_divisors(x))
y_li=(make_divisors(y))
z_li=(list(set(x_li)&set(y_li)))
#print(z_li)

import math
count=1
c=[]
"""
for n in z_li:
  if n == 1:
    count=count+1
    continue
  for k in range(2, int(math.sqrt(n)) + 1):
    print(n,k)
    if n % k == 0:
      break;
    else:
      c.append(n)
      count = count+1
print(c,count)
"""

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True
  
  
for n in z_li:
  if(is_prime(n)==True):
    count=count+1
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())

if N == 1:
  print(N)
  elif N%2 == 0:
    print((N / 2) / N)
    else:
      print((int(N / 2) + 1) / N)

Submission status: Runtime Error

Solution code:
Ns = input()
N = int(Ns)
if(N % 2 == 1):
  if(N == 1):
    prrint(N)
  else:
    print((N-1)/N)
else:
  print(1/2)

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print((N/2)/N)
else:
    print(((N+1)/2)/N)

Submission status: Runtime Error

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

for i in range(N):
    print(A.index(i+1) +1, end =' ')

Submission status: Runtime Error

Solution code:
import math

def gcd(a,b):
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)
    
a,b=list(map(int,input().strip().split()))
c=gcd(a,b)
e=c
d=0
for i in range(2,math.ceil(math.sqrt(e)+2)):
    if c%i==0:
        d=d+1
        c=c//i
print(d+1)

Submission status: Runtime Error

Solution code:
N = int(input())
A = {(i+1):int(j) for i, j in enumerate(input().split())}
A_sorted = sum(map(list, sorted(A.items(), key=lambda x:x[1])), [])
t = A_sorted[0::2]
print(*t, sep=' ')

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
n = min(a, b)
def get_primenumber(N):
    #素数リスト
    prime_list = [2]
    #3からNまでの数字を一つずつ取り出す
    for num in range(3,N+1,2):
      #取り出した数字が素数リストの要素で割れなければ素数リストに追加する
      if all( num % prime != 0 for prime in prime_list):
        prime_list.append(num)

    return prime_list
l = get_primenumber(n)
count = 1
for p in l:
    if a % p == 0 and b % p == 0:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print((N/2)/N)
else:
    print(((N//2+1)/N))

Submission status: Runtime Error

Solution code:
N, A = int(input()), list(map(int, input().split()))
X = []
for i in range(N):
	P = -1
	for j in range(N):
		if (P == -1 or A[j] > A[P]): P = j
	X.append(P + 1)
	A[P] = 0
X.reverse()
print(' '.join([str(x) for x in X]))

Submission status: Runtime Error

Solution code:
n = int(input())
k = int(input())
h = int(input())
a = []
if h >= k:
	a.append(str(h))
print(len(a))

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print(0.5)
else:
    print((N//2+1)/N)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
n = min(a, b)
def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
l = primes(n)
count = 1
for p in l:
    if a % p == 0 and b % p == 0:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print(0.5)
else:
    print(N//2+1/N)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    result_list = []
    for i in range(1, N + 1):
        result_list.append(str(A.index(i) + 1))
    print(" ".join(result_list))
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
odd = 0
for i in range(1,N):
  if i % 2:
    odd += 1
print(float(odd)/(N-1))

Submission status: Runtime Error

Solution code:
a=int(input(""))
if a == 1:
  print("1.0000000000")
else:
  k=a/2
print(k/a)

Submission status: Runtime Error

Solution code:
from functools import reduce


def factors(n):
    return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))


a1, b1 = map(int, input().split())
temp = factors(a1).intersection(factors(b1))
s = set(range(2, max(temp)))
li = []
while s:
    m = min(s)
    li.append(m)
    s -= set(range(m, max(temp) + 1, m))
c = 0
for i in temp:
    if i == 1:
        c += 1
    if i in li:
        c += 1
print(c)

Submission status: Runtime Error

Solution code:
N = int(input())
odd = 0
for i in range(1,N):
  if i % 2:
    odd += 1
print(odd/(N-1))

Submission status: Runtime Error

Solution code:
def odds():
  N = int(input())
  odd = 0
  for i in range(1,N):
      if i % 2:
          odd += 1
  print(odd/(N-1))

if __name__ == '__main__':
  odds()

Submission status: Runtime Error

Solution code:
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print((n+1)/2n)

Submission status: Runtime Error

Solution code:
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print(((n+1)/2n))

Submission status: Runtime Error

Solution code:
N = int(input(''))
if (N % 2) == 0:
  print(round(2/N),10)
else:
  print(round((N+1)/2N),10)

Submission status: Runtime Error

Solution code:
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print(((n+1)/2n)

Submission status: Runtime Error

Solution code:
rule = input().split()
men = input().split()

mens = 0
for i in men:
  if int(rule[0]) <= int(i):
    mens += 1

print(mens)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
order = []
for i in range(1, n+1):
    order += [str(a.index(i)+1)]
print(' '.join(order))

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(s) for s in input().split()]
ans = sorted(range(len(A)), key=lambda k: A[k])
ans = [str(i+1) for i in ans]

print(' '.join(ans))

Submission status: Runtime Error

Solution code:
N = int(input())
A = input().split()
R = []
for i in range(1,N+1):
  dx = A.index(str(i))
  R.append(str(dx+1))

out = ' '.join(R)
print(out)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
order = []
for i in range(1, n+1):
    order += [a.index(i)+1]
print(' '.join(map(str, order)))

Submission status: Runtime Error

Solution code:
N = input()

prob_odd = (N //2 + N % 2) / N

print(prob_odd)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(s) for s in input().split()]
ans = sorted(range(len(A)), key=lambda k: A[k])
ans = [i+1 for i in ans]

print(' '.join(ans))

Submission status: Runtime Error

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby

# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()

'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''

'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''

'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''

'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''

'''
.append(要素)
.insert(場所,要素)
-1で末尾で末尾から一つ前
'''


num = int(stdin.readline().rstrip())
data = stdin.readline().rstrip().split()
res = ''
for el in range(1, num + 1):
    res += str(data.index(str(el)) + 1)
    if (el != num + 1):
        res += ' '
print(res)

Submission status: Runtime Error

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby

# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()

'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''

'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''

'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''

'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''

'''
.append(要素)
.insert(場所,要素)
-1で末尾で末尾から一つ前
'''


num = int(stdin.readline().rstrip())
data = stdin.readline().rstrip().split()
res = ''
for el in range(1, num + 1):
    res += str(data.index(str(el)) + 1)+' '
print(res)

Submission status: Runtime Error

Solution code:
N,K = list(map(int,input().split()))
array = list(map(int,input().split()))
ans = 0
i = 0
while N > i:
  if array[i] >= K:
    ans += 1
    
  i += 1
print(ans)

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print(0.5)
else:
    print(float((N//2+1)/N))

Submission status: Runtime Error

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby

# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()

'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''

'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''

'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''

'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''

'''
.append(要素)
.insert(場所,要素)
-1で末尾で末尾から一つ前
'''


num = int(stdin.readline().rstrip())
data = stdin.readline().rstrip().split()
res = ''
for el in range(1, num + 1):
    res += str(data.index(str(el)) + 1) + ' '
print(res)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = "1" if N == 1 else "0.5" if N%2 != 1 else (N-1)/2N
print(ans)

Submission status: Runtime Error

Solution code:
def main():
    n = input()
    a = list(map(lambda x:int(x),input().split(" ")))
    res = ""
    res = [str(a.index(i+1) + 1) for i in range(len(a))]
    print(" ".join(res))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a=int(input())
b=a+1
c=0
d=0
for i in range(a):
	c=i%2
    if c==1:
    	d=d+i
	else:
    	pass
e=d/a
print(e)

Submission status: Runtime Error

Solution code:
import sys

def main():

	p = 0

	args = sys.argv
	n = int(args[1])
	
	print((int(n/2) + n%2 )/n)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
α = map(int, input().split())
 
if α=1:
    print(1)
    
if (α>=2 and α%2==0):
    print(0.5)
 
else:
    print(0.6)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = "1" if N = 1 else "0.6" if N%2 = 1 else "0.5"
print(ans)

Submission status: Runtime Error

Solution code:
α = map(int, input().split())
 
if α=1:
    print(1)
    
if α>=2 and α%2==0:
    print(0.5)
 
else:
    print(0.6)

Submission status: Runtime Error

Solution code:
n=input()
print(1/2 if n%2==0 else (n-1)/2n)

Submission status: Runtime Error

Solution code:
N = int(input())
print(ans: "1" if N = 1 else "0.6" if N%2 = 1 else "0.5")

Submission status: Runtime Error

Solution code:
def main(n,a_list):

    i = 0
    list = [0] * n
    while i < n:
        list[a_list[i] - 1] = i + 1
        i += 1

    i = 0
    while i < n:
        print(list[i], end="")
        if not i == n - 1:
            print(' ', end="")
        i += 1


if __name__ == '__main__':
    n = int(input())
    a_list = list(map(int, input().split()))
    main(n, a_list)

Submission status: Runtime Error

Solution code:
N = int(input())
print("1" if N = 1 else "0.6" if N%2 = 1 else "0.5")

Submission status: Runtime Error

Solution code:
n=int(inpjut())
print(1/count(n%2==1))

Submission status: Runtime Error

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

if N=1:
    print(1)
    
if N>=2 and N%2==0:
    print(0.5)

else:
    print(0.6)

Submission status: Runtime Error

Solution code:
import sys

	p = 0

	args = sys.argv
	n = int(args[1])
	for i in range(1, n+1):
		if i % 2 == 1:
			p = p + 1
	
	print(p/n)

Submission status: Runtime Error

Solution code:
n=int(input())
a_list = list(map(int,input().split()))
ans_list = []
for i in range(n):
    ans_list.append(a_list.index(i+1) + 1)
print(*ans_list)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
Ans = [0] * (N)
for i in range(N):
    Ans[A[i]-1] = i+1

print(*Ans)

Submission status: Runtime Error

Solution code:
n = input()

if n % 2 == 0:
    print(1 / 2)
else:
    print((((n - 1) / 2) + 1) / n)

Submission status: Runtime Error

Solution code:
N = int(input(''))
if (N % 2) == 0:
  print(N/2N)
else:
  print((N+1)/2N)

Submission status: Runtime Error

Solution code:
import sys

def main():

	p = 0

	args = sys.argv
	n = int(args[1])
	for i in range(1, n+1):
		if i % 2 == 1:
			p = p + 1
	
	print(p/n)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print(0.5)
else:
    a = N//2+1
    b = a/N
    print(b)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
X = list(input().split())
X = list(map(int, X))
a = 0
for i in range(N):
  if X[i] >= K:
    a += 1
  else:
    a += 0
print(a)

Submission status: Runtime Error

Solution code:
A = input()
N = int(A)


if N ==1:
    a = 1
elif 1<=N and N<=100 and N%2 == 0:
    a = 0.5
    a = float(a)
elif 1<=N and N<=100 andN % 2 == 1:
    a = (N/2 + 1)/N

print(a)

Submission status: Runtime Error

Solution code:
S = input()

# import decimal
import math


odd = []
oddness = []


for i in range(S):
    j = i + 1
    if j % 2 != 0:
        odd.append(j)

# decimal.getcontext().prec = 7
# print(decimal.Decimal(len(odd)) / decimal.Decimal(j))
answer = len(odd) / j

print(round(answer, 7))

Submission status: Runtime Error

Solution code:
n =int(input())
print(n//2 if n$2==0 else n%2)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=[i for i in range(n)]
for i in range(n):
    ans[i]=a.index(i+1)+1
print(*ans)

Submission status: Runtime Error

Solution code:
A = input()
N = int(A)


if N ==1:
    print(N) 
elif 1<=N and N<=100 and N%2 == 0:
    a = 0.5
    a = float(a)
elif 1<=N and N<=100 andN % 2 == 1:
    a = (N/2 + 1)/N

print(a)

Submission status: Runtime Error

Solution code:
import sys

def main():

	p = 0

	args = sys.argv
	n = int(args[1])
	for i in range(1, n):
		if i % 2 == 1:
			p = p + 1
	
	print(p/n)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N=int(input())
if N%2=1:
  a=N+1/2
  print(a)
else:
  b=N/2
  print(b)

Submission status: Runtime Error

Solution code:
A = input()
N = int(A)


if N ==1:
    print(N) 
elif N%2 == 0:
    a = 0.5
    a = float(a)
elif N % 2 == 1:
    a = (N/2 + 1)/N

print(a)

Submission status: Runtime Error

Solution code:
a=int(input()
b=a*0,000000001
print(b)

Submission status: Runtime Error

Solution code:
from random import random
n = int(input())
x = randint(1,n)
if n % 2 ==0:
  print(0.5)
else:
  count = (1+n)*n*0.5
  counts = count//2
  print(counts/count)

Submission status: Runtime Error

Solution code:
n = map(int, input())

print((n // 2 + n % 2) / n)

Submission status: Runtime Error

Solution code:
import random for random
n = int(input())
x = randint(1,n)
if n % 2 ==0:
  print(0.5)
else:
  count = (1+n)*n*0.5
  counts = count//2
  print(counts/count)

Submission status: Runtime Error

Solution code:
n =int(input())
print(1%nn)

Submission status: Runtime Error

Solution code:
N=int(input())
if N%2=1:
  a=(N+1)/2
  print(a)
else:
  b=N/2
  print(b)

Submission status: Runtime Error

Solution code:
N = input()
N = int(N)

if N ==1:
    print(N) 
elif N%2 == 0:
    a = 0.5
    a = float(a)
elif N % 2 == 1:
    a = (N/2 + 1)/N

print(a)

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print(0.5)
else:
    print((N // 2 + 1)/N)

Submission status: Runtime Error

Solution code:
N=int(input())
if N%2=1:
  a=(N+1)/2
  print(a)
else:
  b=N/2
  print(N)

Submission status: Runtime Error

Solution code:
N=int(input())
if N%2=1:
  a=N+1/2
  print(a)
else:
  b=N/2
  print(N)

Submission status: Runtime Error

Solution code:
x=int(input())
y=x//2
z=x-y
print(z/y)

Submission status: Runtime Error

Solution code:
N = input()
kisuu = -(-N // 2)
print(kisuu / N)

Submission status: Runtime Error

Solution code:
N = input()
if(N%2=0):
    print('0.5000000000')
else:
    print((N/2)+1/N)

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print((N / 2) / N)

else:
    print(((N + 1) / 2) / N)