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: Accepted

Solution code:
from heapq import heappush, heappop
import queue
import re
import math
import functools

def s_raw():
    return input().rstrip("\r")

def int_raw():
    return int(input())


def ss_raw():
    return input().split()


def ints_raw():
    return list(map(int, ss_raw()))


INF = 1 << 29


def make1d_arr(n, val=INF):
    return [val for i in range(n)]


def make2d_arr(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]


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


def BFord(n,es):
    v_cost = [INF]*n
    v_cost[0] = 0
    for v in range(n*2):
        for e in es:
            frm = e[0]
            to = e[1]
            if v_cost[to] > v_cost[frm]+e[2]:
                v_cost[to] = v_cost[frm]+e[2]
                if v >= n:
                    v_cost[to] = -INF
        if v == n-1:
            prev = v_cost[:]
    v_cost = [-INF if prev[idx]!=v_cost[idx] else v_cost[idx] for idx in range(n)]
    return v_cost
    
def ZAlgo(s):
    l = len(s)
    A = [0]*l
    i =1
    j =0
    A[0]=l
    while i<l:
        while i+j<l and s[j] == s[i+j]:
            j+=1
        if j==0:
            i+=1
            continue
        A[i]=j
        k=1
        while (i+k<l) and (k+A[k]<j):
            A[i+k] =A[k]
            k+=1
        i+=k
        j-=k
    return A


def main():
    n = int_raw()
    if n%2 ==0:
        return 0.5
    return (n//2+1)/n


if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
import math

n = int(input())

a = len([i for i in range(1,n+1) if i%2 != 0])

c = ''
b = [i for i  in range(1, n+1)]

c = len(b)

print('{:.10f}'.format(a/c))

Submission status: Accepted

Solution code:
N = int(input())

print((N - int(N / 2)) / N)

Submission status: Accepted

Solution code:
N = int(input())
import math
print(math.ceil(N/2)/N)

Submission status: Accepted

Solution code:
n=int(input())
ans=(n/2+(n%2)*0.5)/n
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = (N - (N//2)) / N
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

if N%2==0:
  print(float(0.5))

else:
  s=float(((N+1)/2)/N)
  print(s)

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

Submission status: Accepted

Solution code:
from decimal import Decimal
a = int(raw_input())
odds = []
for i in range(1, a + 1):
  if i % 2 != 0:
    odds.append(i)
x = Decimal(str(len(odds))) / Decimal(str(a))
print float(x)

Submission status: Accepted

Solution code:
n = int(raw_input())
if n ==1:
	print 1
else:
	if not n%2:
	  print(0.500000000)
	else:
	  print((int(n/2)+1)/float(n))

Submission status: Accepted

Solution code:
import math
n=int(input())
if n%2==0:
    print(0.5)
else:
    a=math.ceil(n/2)
    print(a/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
count = 0
if n%2 == 0:
	print(1/2)
else:
	for i in range(1,n+1):
		if i % 2 == 0:#偶数を数える
			count += 1
	print((n-count)/n)

Submission status: Accepted

Solution code:
#input
n = int(input())

even = 0
odd = 0
sum = 0

for x in range(1, n + 1):
    if x % 2 == 0:
        even += 1
    else:
        odd += 1
    sum += 1

print("{}".format(odd/sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

odd = []
for i in range(1, N+1):
  if i % 2 == 1:
    odd.append(i)

print(len(odd)/N)

Submission status: Accepted

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

Submission status: Accepted

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

print(count/N)

Submission status: Accepted

Solution code:
import math as m
N = int(input())
odds = m.floor((N+1)/2)
print(odds/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inp=int(input());print((inp+1)//2/inp)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

int_N = int(input())
Kisu = 0

for i in range(1, int_N+1):
    if (i % 2) == 1:
        Kisu += 1

print(Kisu/int_N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
odd  = []
even = []

inp= int(input())

for i in range(1,inp+1):
    if i%2 == 0:
        even.append(i)
 #       print("even append!")
    else:
        odd.append(i)
#      print("odd apprnd!")
    
print(len(odd)/(len(odd)+len(even)))

Submission status: Accepted

Solution code:
import random

int_N  = int(input())
i = 1
Kisu = 0

for i in range(int_N):
    if i % 2 == 0:
        Kisu += 1

print(Kisu/int_N)

Submission status: Accepted

Solution code:
def main():
    n = int(input())

    print(((n+1)//2)/n)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
x_all = list(range(1, x+1))
x_odds = list(filter(lambda xx: xx % 2 == 1, x_all))
print(float(len(x_odds)) / len(x_all))

Submission status: Accepted

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

Submission status: Accepted

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

for num in range(1,N+1):
    if num % 2 == 1:
        odd_num += 1

print(odd_num/N)

Submission status: Accepted

Solution code:
N = int(input())
A = list(range(1, N+1))
x = 0

for a in A:
    if a % 2 == 1:
        x +=1

ans = x / N
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

gusu = n // 2

print((n - gusu)/n)

Submission status: Accepted

Solution code:
import sys
N = int(input())
print((int(N/2)+N%2)/N)

Submission status: Accepted

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

for i in range(1,N+1):
  if i % 2 != 0:
    count += 1

probability = count / N

print(probability)

Submission status: Accepted

Solution code:
N = int(input())
odd = 0
for i in range(1, N+1):
    if i%2 == 1:
        odd += 1
p = odd/N
print("{:.10f}".format(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ans_lst = list()

for i in range(1, n+1):
    if i % 2 != 0:
        ans_lst.append(i)

print(len(ans_lst)/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    n = int(input())
    odd = int(n / 2)
    print(float(float(n-odd)/float(n)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
answer = 0.0

if n == 1:
    answer = 1.0
elif n % 2 == 0:
    answer = 0.5
else:
    answer = (n + 1) / 2 / n

print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
print(((N + 1)//2)/N)
  		
#int(input()) で入力された数値をint型で受け取る
#(N+1)//:N+1を2で割ったものが
#切り捨て除算
#(8+1)//2=4,(9+1)//2=5:これが正整数Nに含まれる奇数の数になる

Submission status: Accepted

Solution code:
import math

N = int(input())
res = math.ceil(N / 2) / N
print(res)

Submission status: Accepted

Solution code:
import math

N = int(input())
k = math.ceil(N/2)
print(k/N)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
odd = [i for i in range(1, n + 1) if i % 2 == 1]
print(len(odd) / n)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
surplus = N%2
  
if surplus == 1:
    percent = ((N-1)/2+1)/N
else:
    percent = N/(2*N)

print(percent)

Submission status: Accepted

Solution code:
N = int(input())
ans = (N+N%2) / (2*N) 
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

a = 0
for i in range(1, n+1):
  if (i%2) == 1:
    a += 1

print(a/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 142 - 1
# -*- encoding: UTF-8 -*-

n = float(input())
p = 0

if n == 1 :
  p = float(1.0)
elif (n % 2) == 0 : 
  p = float(0.5)
else :
  p = float(0.5 + 0.5 / n)
  
print(p)

Submission status: Accepted

Solution code:
n = int(input())

numera = 0
for num in range(1, n+1):
    if num % 2 != 0:
        numera += 1

print(numera/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt_value / N)

Submission status: Accepted

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

Submission status: Accepted

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

if int(a)%2 == 1:
        print(str(float(float(((a-1)/2)+1)/a)))
else:
        print(str(float(float(a/2)/a)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    from math import ceil

    n = int(input())
    print(ceil(n / 2) / n)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

count=0
for i in range(1,n+1):
  if i %2 !=0:
    count+=1
ans=count/n

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

Submission status: Accepted

Solution code:
n = int(input())
num = list(range(1, n + 1))
oddnum = list(range(1, n + 1, 2))
print(len(oddnum) / len(num))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

#N = map(int, input().split())
N = int(input())
if N%2==0:
    a=1/2
    print(a)
else:
    a=(N+1)/(2*N)
    print(a)

Submission status: Accepted

Solution code:
import math


def main():
    N = int(input())
    a = (math.ceil(N/2)/N)
    print(a)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

else:
  print(M/N)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math

N = float(input())
print(math.ceil(N/2) / N)

Submission status: Accepted

Solution code:
#!/snap/bin/pypy3


def main():
    N = int(input())
    print((N - N // 2) / N)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

a  = int(input())

odd = a // 2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

X=N//2+N%2
print(X/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 0 :
    n_even = int(N / 2)
    n_odd = n_even
    chance = n_odd / N
    print(chance)
    
else :
    n_even = int(N / 2)
    n_odd = n_even + 1
    chance = n_odd / N
    print(chance)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def odd(i):
    if i==1:
        return 1.0
    elif i%2==0:
        return 0.5
    else:
        return (i//2+1)/i

if __name__ == '__main__':
    i=int(input())
    print(odd(i))

Submission status: Accepted

Solution code:
n = int(input())

oppai = (n+1)//2 

print(oppai/n)

Submission status: Accepted

Solution code:
n = int(input())

odd = -(-n//2)

print(odd/n)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
print(1-(n//2)/n)

Submission status: Accepted

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

print(odd/N)

Submission status: Accepted

Solution code:
#142a
import math

N = int(input())

if N%2==1:
    print((math.ceil(N/2))/N)
elif N%2==0:
    print((N/2)/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
print(((N+1)//2)/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

x = (n + 1) / 2
f = (x * 1.0) / n

print "{0:.9f}".format(f)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())


def check(n):
    div, mod = divmod(n, 2)

    if mod == 0:
        print(0.5)
    else:
        print((div + 1) / n)


check(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
a = math.ceil(N/2)/N
print(a)

Submission status: Accepted

Solution code:
N = int(input())

if N%2:
    ans = (N//2 + 1)/N

else:
    ans = 0.5

print(ans)

Submission status: Accepted

Solution code:
N = int(input())


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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(x):
  if x%2==0:
    return 0.5
  else:
    return (int(x/2)+1)/x

x=input()
print(f(int(x)))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

if n == 1:
  print('1.0000000000')
elif n % 2 == 0:
  print('0.5000000000')
else:
  a = int(n / 2) + 1
  print(a / n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

if n == 1:
    print("{:.10f}".format(1))
    exit()

res = (n-math.floor(n/2))/n


print("{:.10f}".format(res))

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

Solution code:
import math

n=int(input())
ans=0

if n==1:
  ans=1
elif n%2==0:
  ans=0.5
else:
  ans=math.ceil(n/2)/n
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import sys
N=int(input())
if N%2==0:
    print('0.5')
    sys.exit()
print((N-N//2)/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

a = (N + 1) // 2

ans = a / N

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#atcoder beginner contest 142
#A odds of oddeness

N = int(input(""))
if N % 2 == 0:
    print(1/2)
else:
    odd = (N + 1) / 2 
    even = (N - 1) / 2
    print(odd / (odd + even))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a=int(input())
b=math.floor(float(a/2))
print(float((a-b)/a))

Submission status: Accepted

Solution code:
from sys import stdin

N = int(stdin.readline())

if N%2 == 0:
    ans = 0.5
else:
    ans = 1 - ((N-1)/2)/N

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

if N%2:
    print((N+1)/(2.0*N))
else:
    print(1.0/2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import math



N = int(input())
print(math.ceil(N/2)/N)

Submission status: Accepted

Solution code:
import math

n=int(input())
print(math.ceil(n/2)/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

#4 1,3
#5 1,3,5
#6 1,3,5
#7 1,3,5,7
num=0
if n%2==0:
    num=n//2
else:
    num=n//2+1
print(num/n)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N=int(input())
if N%2==1:
    print("{:.7f}".format((N//2+1)/N))
else:
    print("{:.7f}".format((N//2)/N))

Submission status: Accepted

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

print(a / n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 奇数の割合
# in : 4
# out : 0.5000000000

N = int(input())
num = 0
if N % 2 == 0:
    num = int(N / 2)
else:
    num = int(N / 2) + 1

print("{:.10f}".format(num / N))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

nodds = (N + 1) // 2
print(nodds / N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

else:
    print(1/2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(p)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = float(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
O = sum([1 for i in range(1,N+1) if i%2==1])
print(O/N)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(string):
    n = int(string)
    return str((n+1) // 2 / n)


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-
import math

MOD = 10 ** 9 + 7

n = int(input())

ans = math.ceil(n/2) / n

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

o=0

for i in range(1, n+1):
    o += i % 2

print(o/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=float(input())
a=(((n+1)//2))
a/=n
print('%.7f'%a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = float(raw_input())
print math.ceil(N/2)/N

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
if n%2==0:
  a=n//2
else:
  a=n//2+1
p=a/n
print('%.6f'%p)

Submission status: Accepted

Solution code:
number = int(input())
if number % 2 == 0:
	odd_num = number // 2
	percent = odd_num / number
else:
	odd_num = number // 2 + 1
	percent = odd_num / number

print(percent)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
N=int(N)
number = 0
for i in range(1,N+1):
    if i%2 == 1:
        number = number + 1
    else:
        pass
#print(number)
print(number/N)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

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

Submission status: Accepted

Solution code:
#attcorder problem 142A
N=input()
a=0
N=int(N)

if 0<=N<=100:
    for i in range(1,N+1):
        if i%2!=0:
            a+=1 
        
print(a/(N))

Submission status: Accepted

Solution code:
n = int(input())
print([1-(0.5*(n-1))/n, 0.5][n%2==0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = N//2
print(1.0-a/N)