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:
n = int(input())
lst = list(map(int,input().split()))
reallst = []
for k in range(1,n+1):
  for i in range(n):
    if lst[i] == k:
      reallst.append(i+1)
print(reallst[:])

Submission status: Runtime Error

Solution code:
n = int(input())
ls = list(map(int,input().split()))
a = [0 for j in range(n)]
for i in range(n):
    a[i] = [ls[i],str(i+1)]
a.sort()
for k in range(n):
    print(a[k][1],end=' ')

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
import math

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct


def main():
	a,b = map(int, input().split())
	num = math.gcd(a,b)
	if num == 1:
		print(1)
		exit()
	result_list = factorize(num)
	print(len(set(result_list)) + 1)			
	


if __name__ == "__main__":
	main()

Submission status: Runtime Error

Solution code:
import sys
n, k = map(int, sys.stdin.readline().split())
li = list(map(int, sys.stdin.readline().split()))
cnt = 0
for i in li:
  if i >= k:
    cnt += 1
print(cnt)

Submission status: Runtime Error

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

cnt = 0
for i in range(1, N+1):
    if i % 2 == 1:
        cnt += 1
print(cnt/n)

Submission status: Runtime Error

Solution code:
n=map(int,input().split())
print(0.5 if n%2==0 else ceil(n/2)/n)

Submission status: Runtime Error

Solution code:
n = int(input())
lst = []
for i in range(n):
  if i % 2 == 1:
    lst.append(i)
print(n/len(lst))

Submission status: Runtime Error

Solution code:
N = input()
print((N+1)/2)

Submission status: Runtime Error

Solution code:
print((input()+1)/2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K = int(input())
     
a = math.ceil(K/2)

Submission status: Runtime Error

Solution code:
n = int(input())

a=math.ceil(n/2)

print(a/n)

Submission status: Runtime Error

Solution code:
n=input(int())

a=math.ceil(n/2)

print(int(a))

Submission status: Runtime Error

Solution code:
n=int(input())

a=math.ceil(n/2)

print(int(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#Coding:Utf-8
N=int(input())
print(f'{2/N:.10f}')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

if n%2==0:
  print(0.5)
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(1/2)
else:
  print((n-1)/2n)

Submission status: Runtime Error

Solution code:
import fractions
A,B=map(int,input().split())
gcd=fractions.gcd(A, B)
ans=1
setgcd=gcd
for i in range(2,setgcd+1):
  if gcd%i==0:
    ans=ans+1
    while gcd%i==0:
      gcd=round(gcd/i)
  if i*i>setgcd:
    break
print(ans)

Submission status: Runtime Error

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

B = []
for i in range(N):
    B.append(A.index(i+1) + 1)

print(' '.join(map(str, B)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
h = list(map(int, input().split()))
out = 0
for i in h:
 if i >= k:
  out = out + 1
  
print(out)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
h = list(map(int, input().split()))
out = 0
for i in h:
 if h >= k:
  out += 1
print(out)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
h = list(map(int, input().split()))
out = 0
for i in h:
 if h >= k:
  out =+ 1
print(out)

Submission status: Runtime Error

Solution code:
N = int(input)
n = N / 2
print(str(n / N))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=int(input())
if S/2=0.5:
    print(0.5)
else:
    prrint(3/S)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
H = list(map(int, input().split()))
count = 0
for h in H:
    if h >= K:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
lst = list(map(int, input().split()))
i = 0
for h_i in lst:
    if h_i < K:
        continue
    else:
        i += 1
print(i)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
lst = list(map(int, input().split()))
i = 0
for h_i in lst:
    if h_i < K:
        continue
    i += 1
print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if N == 1:
    print(1)
elif N % 2 == 0:
    print(0.5)
else:
    print((N-2)/N)

Submission status: Runtime Error

Solution code:
from sys import stdin

A = int(stdin.readline().rstrip())

if A%2 == 0:
    print(A/(A/2))
else:
    print(A/(A//2))

Submission status: Runtime Error

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

print(ans/N)

Submission status: Runtime Error

Solution code:
from fractions import gcd
import math
import numpy as np
N = list(map(int, input().split()))
g = gcd(N[0], N[1])

prime = [1]
for i in range(2, g+1):
  while g % i == 0:
    g /= i
    prime.append(i)
print(len(set(prime)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(n): #1~nについて
    b[i] = a.index(i+1) + 1

print(*b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

n = int(input())

bunsi = 0

for i in range(n + 1):
    if n % i == 1:
        bunsi += 1

print(bunsi+ 1 / n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
H = list(map(int,input().split()))
count = 0
for h in H:
  if h >= k:
   	count += 1
print(count)

Submission status: Runtime Error

Solution code:
n=int(input());print(-(-N//2)/N)

Submission status: Runtime Error

Solution code:
n = int(input())
num = 0
for i in range(1, n+1):
    if i%2 != 0
    num += 1
    
print(num/n)

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
print(int(input()+0.5)//2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
n = int(input())

if n % 2 == 0:
    print(1/2)
else:
    pro = math.floor(n /2) +1
    print(pro/

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
 
n, m = na()
g = [[False] * n for _ in range(n)]
gs = [[] for _ in range(n)]
for i in range(m):
    s, t = na()
    gs[s-1].append(t-1)
    g[s-1][t-1] = True
 
ans = 999999
best = None
for i in range(n):
    ds = [9999999] * n
    prevs = [-1] * n
    ds[i] = 0
    q = [i]
    qp = 0
    while qp < len(q):
        cur = q[qp]
        qp += 1
        for e in gs[cur]:
            if ds[e] > ds[cur] + 1:
                ds[e] = ds[cur] + 1
                prevs[e] = cur
                q.append(e)
    for j in range(n):
        if g[j][i]:
            if ds[j] + 1 < ans:
                ans = ds[j] + 1
                best = [0] * (ds[j]+1)
                best[0] = i
                cur = j
                r = -1
                while cur != i:
                    best[r] = cur
                    r -= 1
                    cur = prevs[cur]
 
if not best:
    print(-1)
else:
    print(ans)
    for x in best:
        print(x+1)

Submission status: Runtime Error

Solution code:
a = input()

b = ((a-a/2)/a)

print(b)

Submission status: Runtime Error

Solution code:
a = input

b = ((a-a/2)/a)

print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
inport math
b=a/2
c=math.ceil(b)
print(c/a)

Submission status: Runtime Error

Solution code:
a=int(input())
inport math
b=math.ceil(a/2)
print(b/a)

Submission status: Runtime Error

Solution code:
a=int(input())
inport math
b=math.ceil(a/2)
print(a/b)

Submission status: Runtime Error

Solution code:
a=input()
b=a//2
print(b/a)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from math import ceil
n= input()
print(ceil(n/2)/n)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
cnt = 0
ans = []

for i in range(n):
    cnt += 1
    ind = a.index(cnt)
    ans.append(str(ind + 1))

print(" ".join(ans))

Submission status: Runtime Error

Solution code:
N=int(input())
x=N//2
print(X/N)

Submission status: Runtime Error

Solution code:
N=int(input())
x=a//2
print(X/a)

Submission status: Runtime Error

Solution code:
import numpy as np
import math

# input

r, D, x = [int(_) for _ in input().split()]

xans = np.ones(10)

def Linear_Recursive(x, r, D, N):
    
    if N==0:
        xans = x
        return xans
    
        
    
    xans = r*Linear_Recursive(x, r, D, N-1) - D # linear eq.
    
    return xans
  
for i in range(10):
    xans[i] = round(Linear_Recursive(x, r, D, i+1))
    
    print(xans[i])

Submission status: Runtime Error

Solution code:
def gcd(n,m):#n,mは正の整数、最大公約数　許容は？
    if n==0:
        return m
    elif m==0:
        return n
    elif n>m:
        n=n%m
        return gcd(n,m)
    else:
        m=m%n
        return gcd(n,m)

def ord(N,n):#N,nは正の整数、Nで割り切れる回数、許容はN^1000
    if n%N!=0:
        return 0
    else:
        return 1+ord(N,n//N)

def get_sieve_of_eratosthenes_new(n):
    import math
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]

primelist=get_sieve_of_eratosthenes_new(10**6)

A,B=map(int,input().split())
x=gcd(A,B)
count=1

for i in range(0,len(primelist)):
    if x%primelist[i]==0:
        count+=1
        x=x//primelist[i]**ord(primelist[i],x)
if x!=1:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
package main

import(
  "fmt"
)

func main() {
  var N int
  fmt.Scan(&N)
  if N % 2 == 0 {
    fmt.Println(0.5)
  } else {
    fmt.Println(((float64(N)-float64(1))/float64(2)+float64(1))/float64(N))
  }
}

Submission status: Runtime Error

Solution code:
def Euclid(a,b):
  r = a % b
  if r == 0:
    return b
  return Euclid(b,r)
import fractions

a,b = map(int,input().split())
#c = Euclid(a,b) if a > b else Euclid(b,a)
c = fractions.gcd(a,b)

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
  
if c == 1:
  print(1)
else:
  print(len(factorization(c))+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)


def prime_factorize(n):
    p = []
    while n % 2 == 0:
        if 2 not in p:
            p.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            if f not in p:
                p.append(f)
                n //= f
        else:
            f += 2
    if n != 1 and n not in p:
        p.append(n)
    return p


a, b = map(int, input().split())
q = prime_factorize(gcd(a, b))
# print(q)
print(len(q) + 1)

Submission status: Runtime Error

Solution code:
n = int(input())

if n == 1:
  print(1)

elif n == 2:
  print(0.5)
  
elif n%2 == 0:
  print(0.5)
  
else:
  print((n+1)/2n)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i range (1,n+1):
  
  if i%2==1:
    x+=1
    
print(x/n)

Submission status: Runtime Error

Solution code:
N = input()
output = float((2*N-1)/N)
print(output)

Submission status: Runtime Error

Solution code:
import sys


print("Please enter a value of N")
n = int(input())
if isinstance(n,int) == False:
    #print("Input value is not a type of int.")
    #sys.exit()
    return
elif n < 1 or 100 < n:
    #print("Input value is not in this range [0,100].")
    #sys.exit()
    return
else:
    if n%2 == 0:
        a = float(1/2)
    else:
        a = float(((n+1)/2)/n)
    
    print(a)
    return

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

if N % 2 == 0:
    print(1-(N/2)/2)
elif:
    odd_N = N//2 + 1
    print(odd_N / N)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
c = 0
for i in range(1, N+1):
  if i % 2 == 1:
    c+=1

print(c/N)

Submission status: Runtime Error

Solution code:
c = 0
for i in range(1, N+1):
  if i % 2 == 0:
    c+=1

print(c/N)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
MAX = 10**8+1
N, M = map(int, input().split())

X = [MAX]*(2**N)
X[0] = 0

for i in range(M):
    a, b = map(int, input().split())
    k = sum(1<<(c-1) for c in map(int, input().split()))

    for j, x in enumerate(X):
        if X[j|k] > x + a:
            X[j|k] = x + a

print(X[-1] if X[-1] < MAX else -1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = float(input())
if N % 2.0 == 1.0:
  print(((N + 1.0)/2.0)/N)
else:
  print((N/2.0/)N)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
r = ((r//2) + (r%2))  / n
print(r)

Submission status: Runtime Error

Solution code:
n = int(input())
r = ((r//2) + (r%2))  / r
print(r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    x,y = map(int,input().split())
    tmp = []
    for i in range(2,max(2,min(int(x // 2)+1, int(y //2 )+1))):
        if x % i ==0 and y % i == 0:
            tmp.append(i)
            while True:
                if x % i == 0:
                    x = x//i
                else:
                    break
            while True:
                if y % i == 0:
                    y = y//i
                else:
                    break


    print(len(tmp) + 1)
    # print(tmp)
    # for i,a in enumerate(tmp):
    #     if a < 4:
    #         tmp[i] = 1
    #         continue
    #     j = 2
    #     for j in range(2,int(a**0.5)+1):
    #         if a % j == 0:
    #             tmp[i] = 0
    #             break
    #     if tmp[i] != 0:
    #         tmp[i] = 1
    # print(sum(tmp))
    # print(tmp)

    # cnt = 0
    # # print(tmp)
    # flg = 0
    # for i,a in enumerate(tmp):
    #     # print('out' + str(i) + ' ' + str(a))
    #     if a == 1:
    #         continue
    #     leng = len(tmp)
    #     for j in range(i+1,leng):
    #         # print(j)
    #         # print(tmp)
    #         # print(leng)
    #         if flg == 1:
    #             j -=1
    #         flg = 0
    #         if j >= leng:
    #             break
    #         # print(str(j) + ' ' + str(leng) + ' ' + str(tmp[j]))
    #         if tmp[j] % a == 0:
    #             tmp.pop(j)
    #             leng -=1
    #             j -= 1
    #             # print(tmp)
    #             # print(j)
    #             flg = 1
    #
    #                 # print(j)
    #                 # print(a)
    #

    # print(len(tmp))
    # print(tmp)
if __name__=='__main__':
    main()

Submission status: Runtime Error

Solution code:
def main():
    x,y = map(int,input().split())
    tmp = []
    for i in range(2,max(2,min(int(x ** 0.5)+1, int(y ** 0.5 )+1))):
        if x % i ==0 and y % i == 0:
            tmp.append(i)
            while True:
                if x % i == 0:
                    x = x//i
                else:
                    break
            while True:
                if y % i == 0:
                    y = y//i
                else:
                    break


    print(len(tmp) + 1)
    # print(tmp)
    # for i,a in enumerate(tmp):
    #     if a < 4:
    #         tmp[i] = 1
    #         continue
    #     j = 2
    #     for j in range(2,int(a**0.5)+1):
    #         if a % j == 0:
    #             tmp[i] = 0
    #             break
    #     if tmp[i] != 0:
    #         tmp[i] = 1
    # print(sum(tmp))
    # print(tmp)

    # cnt = 0
    # # print(tmp)
    # flg = 0
    # for i,a in enumerate(tmp):
    #     # print('out' + str(i) + ' ' + str(a))
    #     if a == 1:
    #         continue
    #     leng = len(tmp)
    #     for j in range(i+1,leng):
    #         # print(j)
    #         # print(tmp)
    #         # print(leng)
    #         if flg == 1:
    #             j -=1
    #         flg = 0
    #         if j >= leng:
    #             break
    #         # print(str(j) + ' ' + str(leng) + ' ' + str(tmp[j]))
    #         if tmp[j] % a == 0:
    #             tmp.pop(j)
    #             leng -=1
    #             j -= 1
    #             # print(tmp)
    #             # print(j)
    #             flg = 1
    #
    #                 # print(j)
    #                 # print(a)
    #

    # print(len(tmp))
    # print(tmp)
if __name__=='__main__':
    main()

Submission status: Runtime Error

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

int main()
{
    int n;
    cin >> n;

    double x = floor(n / 2.0);

    double prob = 0;
    if (n % 2 == 0)
    {
        prob = 0.5;
    }
    else
    {
        prob = (x + 1) / n;
    }

    cout << prob << endl;

    return 0;
}

Submission status: Runtime Error

Solution code:
n=int(input())
a=input().split()
ans=''
for i in range(1,n+1):
    ans+=str(a.index(str(i))+1)+' '

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(input())
ans=''
for i in range(1,n+1):
    ans+=str(a.index(str(i))+1)+' '

print(ans)

Submission status: Runtime Error

Solution code:
def main():
	# a,b,k = map(int,input().split())
	# n,k = map(int,input().split())
	n = int(input())
	# a = list(map(int,input().split()))
	# rsp = list(str(input()))
	# l = [list(map(int, input().split())) for _ in range(5)]
	# s = list(s)
	
	for i in range(n):
		if n % 2 != 0:
			ans += 1
	print(ans/n)


 
if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
def solve():
    N, M = map(int, input().split())
    INF = 10 ** 9
    
    dp = [INF] * (2 ** N)
    dp[0] = 0
    for _ in range(M):
        a, b = map(int, input().split())
        c = list(map(lambda x: int(x) - 1, input().split()))
        open = 0
        for i in range(b):
            open += 1 << c[i]
        for i in range(2 ** N):
            if dp[i] + a <= dp[i | open]:
                dp[i | open] = dp[i] + a
    
    if dp[-1] == INF:
        print(-1)
    else:
        print(dp[-1])


if __name__ == '__main__':
    solve()

Submission status: Runtime Error

Solution code:
import fractions

  
def isprime(x):
    count = 1
    for i in range(2,int(x**0.5)+1):
        if x % i == 0:
            count += 1
      
    return count

a,b = map(int,input().split())
g = fractions.gcd(a,b)



ans=0
for i in range(1,int(g**0.5)+1):
    if g % i == 0:
        if isprime(i) == 1:
            ans += 1
        if i != g//i:
            if isprime(g//i) == 1:
                ans += 1
       

print(ans)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
h = list(map(int,input().split()))
cnt=0
for i in range(n):
	if k<=h[i]:
		cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
n,k = map(int,input())
h = list(map(int,input().split()))
cnt=0
for i in range(n):
	if k<=h[i]:
		cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
N_list = list(N)
a = 0
for i in range(N):
    if N_list[i]%2==0:
	       a += 1
ave = a/len(N_list)
print(ave)

Submission status: Runtime Error

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

order = []


for i in range(1,n+1):
    order.append(a.index(i)+1)
    

for i in range(n):
    order[i] = str(order[i])

print(' '.join(order))

Submission status: Runtime Error

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

ans = list(range(n))
for i in range(n):
    ans[a[i]-1] = i+1
print(" ".join(map(str,ans)))

Submission status: Runtime Error

Solution code:
N = int(input("Number:\n"))
if(N%2==):
  res = (N/2)/N
else:
  res = ((N+1)/2)/N
print(res)

Submission status: Runtime Error

Solution code:
N = input("Number:\n")
if(N%2==0):
  res = (N/2)/N
else:
  res = ((N+1)/2)/N
print(res)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
  b[a[i]-1]=i+1
print(" ",join(map(str,b)))

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
  b[a[i]-1]=i+1
print(" ",join(map(str,b)))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
h=list(map(int,input().split()))
count=0
for i in h:
    if k<=i:
        count+=1
print(count)

Submission status: Runtime Error

Solution code:
def main():
  N=int(input())
  s=0
  for i in range(1,N+1):
    if i%2==0:
       s=s
    else:
       s=s+1
print(s/N)
main()

Submission status: Runtime Error

Solution code:
def main():
  N=int(input())
  s=0
  for i in range(1,N+1):
    if i%2==0:
       s=s
    else:
       s=s+1
print(s/N)

Submission status: Runtime Error

Solution code:
a=input()
b=(a+1)/2*a
if a%2==0:
  print(0.5)
else:
  print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

Solution code:
 n=int(input())
 odd=(n+1)//2
 print(odd/n)

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(1 / 2)

else:

    print((n + 1) / 2n)

Submission status: Runtime Error

Solution code:
n=int(input())
if n%2==0:
    print("0.5")
else:
    print("{}".format((m+1)/n))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
cnt =　0
for i in range(n):
  if (i+1)%2　==　1:
    cnt +=　1
print(cnt/n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(inpuit())
print((n // 2) / n)

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
n = int(input())
li = [int(z) for z in input().split()]

l2 = [""] * n

c = 0
for i in li:
  l2[c] = i
  c += 1
print(l2)

Submission status: Runtime Error

Solution code:
n, h = [int(z) for z in input().split()]
li2 = [int(z) for z in input().split()]

f = 0
for i in li2:
  if i >= h:
    f += 1
print(f)

Submission status: Runtime Error

Solution code:
import fractions

A, B = map(int, input().split())
g = fractions.gcd(A, B)

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            # print(i)
            flag = 1
            for j in range(2, int(i**0.5)+1):
                if i%j == 0:
                    flag = 0
                    break
            if flag == 1:
                divisors.append(i)
            if i != n // i:
                flag = 1
                for j in range(2, int((n // i)**0.5)+1):
                    if (n // i) %j == 0:
                        flag = 0
                        break
                if flag == 1:
                    divisors.append(n//i)
    return divisors

print(len(make_divisors(g)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=["SUN","MON","THU","WED","THU","FRI","SAT"]
print(7-b.index(a))

Submission status: Runtime Error

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

print('{:.10f}'.format(ans))

Submission status: Runtime Error

Solution code:
import sys

import numpy as np
from math import gcd

a, b = map(int, sys.stdin.readline().split())

U = gcd(a, b)

is_prime = np.zeros(10**6, dtype=bool)
is_prime[2] = True
is_prime[3::2] = True

for i in range(int(np.sqrt(U))):
    if is_prime[i]:
        is_prime[2 * i::i] = False
    
primes = is_prime.nonzero()[0]
ans = (U % primes == 0).sum()

if U != 1:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
s = int(input())
count = 0
if s % 2 == 0:
  count = s // 2  + 1
  print((s/count) * (10 ** -6))
else:
  print((s / (s//2)) * (10 ** -6) )

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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