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:
#!/usr/bin/env python3
import sys


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


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if N == 1:
    print("1")

elif N % 2 == 0:
    k = (N/2) / N
    print(k)

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

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)
if N%2 == 1:
  a = (N+1)/2
  print(a/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())

a = float(N/2)

b = math.ceil(a)

od = float(b/N)

#print('N', N)

print(od)

Submission status: Accepted

Solution code:
inp = int(input ())

from decimal import *

getcontext().prec = 6

if inp%2 == 0:
    print('0.5000000000')
else:
    answer = Decimal(int(inp//2 + 1))/Decimal(inp)
    print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

print(count/n)

Submission status: Accepted

Solution code:
n = int(input())
cnt = 0
for x in range(1, n + 1):
    if x % 2 == 1:
        cnt += 1
print(format(cnt / n, '.6F'))

Submission status: Accepted

Solution code:
N = int(input())

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

print(P)

Submission status: Accepted

Solution code:
n = int(input())

odd = n // 2 + 1 if n % 2 else n // 2 

print(odd / n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

if n%2>0:
  ans = int(n/2)+1
  print(format(ans/n, '.11f'))
  
else:
  ans = int(n/2)
  
  print(format(ans/n, '.11f'))

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline().rstrip()


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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())
print(int(N/2+0.5)/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
nums = [i for i in range(1, N+1)]
ans = nums[0::2]
print(len(ans)/len(nums))

Submission status: Accepted

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

Submission status: Accepted

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

kisu = math.floor((N+1)/2)

ans = kisu/N

print(ans)

Submission status: Accepted

Solution code:
import math

num = float(input())
odd_cnt = math.ceil(num / 2)
ratio = odd_cnt / num

print(format(ratio, '.10f'))

Submission status: Accepted

Solution code:
num = int(input())

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

exit(0)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(raw_input())

count = 0.0

for i in xrange(1,N+1):
    if i%2 != 0:
        count += 1
    
print("{0:.10f}".format(count/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:
def sub_a():
    n = int(input())
    count = 0
    for i in range(n+1)[1:n+1]:
        if i % 2 != 0:
            count += 1
    ret = count / n
    print(ret)


if __name__ == '__main__':
    sub_a()

Submission status: Accepted

Solution code:
n = int(input())

if n == 1:
    print('{0:.10f}'.format(1))
else:
    a = n%2
    if a == 1:
        amari = ((n-1)/2 +1)/n
        print('{0:.10f}'.format(amari))
    else:
        print('{0:.10f}'.format(0.5))

Submission status: Accepted

Solution code:
n = int(input())
data = [i for i in range(1,n+1)]
r = 0

for i in data:
  if i % 2 != 0:
    r += 1

print(float(r)/n)

Submission status: Accepted

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

print(odd/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:
a = int(input())

if (a % 2 == 0):
    print("0.50000000")
else:
    b = (a // 2) + 1
    c = b / a
    print(c)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
 
if N%2 == 0:
     print(0.5)
else:
    print(1-int(N/2)/N)

Submission status: Accepted

Solution code:
N=input()
N=int(N)
even=0
odd=0

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

print(odd/N)

Submission status: Accepted

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


def solve(N: int):
    p = 0
    if N % 2 == 0:
        p = 1 / 2
    else:
        p = ((N - 1) / 2 + 1) / N
    print("{0:.10f}".format(p)) 
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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
    solve(N)

if __name__ == '__main__':
    main()

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:
import math
N = int(input())
print(math.ceil(N / 2) / N)

Submission status: Accepted

Solution code:
n = int(input())

num_odds = int(n/2)
if n%2 != 0:
    num_odds += 1
print(num_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:
n = int(input())
print( (n//2 + n%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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0:
    print(int(N/2)/N)
    
else :
    print(int(N/2+1)/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())

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

Submission status: Accepted

Solution code:
n = int(input())
print('%.10f' % ((n//2 + n%2)/n))

Submission status: Accepted

Solution code:
n = int(input())

odd = n
if n%2==1:
    odd += 1

odd /= 2
print( odd / n )

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = int(input().rstrip())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
if N % 2 == 0:
    print(float((N / 2) / N))
else:
    print(float(int(((N / 2) + 1)) / N))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

odd = []

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

a = len(odd) / N

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

Submission status: Accepted

Solution code:
from decimal import Decimal


N = int(input())

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(count/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from decimal import *
# 整数の入力
a = int(input())
if a%2 ==0:
    ans = Decimal(a//2)/Decimal(a)
else:
    ans = Decimal(a//2 + 1 )/Decimal(a)
print(ans)

Submission status: Accepted

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で末尾で末尾から一つ前
'''


N = int(stdin.readline().rstrip())
T = list(range(1, N+1))
t = len([x for x in T if x % 2 == 1])
print(t/len(T))

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:
    result = 0.5
elif N==1:
    result = 1
else:
    result = ((N//2)+1)/N

print(result)

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:
import math

if __name__ == '__main__':
    a = int(input())
    guusuu = a % 2 == 0
    if guusuu:
        print("0.5000000000")
    else:
        val_kisuu = math.ceil(a / 2)
        print('{:.9f}'.format(val_kisuu / a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
	num = int(input())

	if num % 2 == 0:
		print("0.5")
	else:
		print(str((num // 2 + 1) / num))

Submission status: Accepted

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

import sys, os

def main():
    ans = 0
    N = int(input())
    if (N%2 == 1):
        ans = 1-((N-1)/(2*N))
    else:
        ans = 0.5
    print (ans)


if __name__ == "__main__" :
    main()

Submission status: Accepted

Solution code:
N = int(input())

even = N // 2
odd = N - even

print(odd / float(N))

Submission status: Accepted

Solution code:
N = int(input())

if N == 1:
    print(1.0000000000)

elif N % 2 == 0:
    print(0.5000000000)

elif N % 2 == 1:
    b = N // 2 + 1
    print(float(b / N))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import random

n=int(input())
print((n//2+1)/n if n%2==1 else 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:
    ans = (N // 2)/float(N)
else:
    ans = ((N // 2) + 1) / float(N)

print(ans)

Submission status: Accepted

Solution code:
import math
a = int(input())
print('{:.10f}'.format((math.floor(a/2)+a%2)/a))

Submission status: Accepted

Solution code:
N=int(input())

if N%2==0:
    print('{:.6f}'.format(1/2))
else:
    print('{:.6f}'.format(((N+1)/2)/N))

Submission status: Accepted

Solution code:
import sys
a=int(input())

b=-(-a//2)

print(b/a)

Submission status: Accepted

Solution code:
# A - Odds of Oddness
n = (int)(input())


if n % 2 == 0:
    print('{:.10f}'.format(1 / 2))
else:
    print('{:.10f}'.format((n + 1) / n / 2))

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
if n==1:
  print('{:.10f}'.format(1))
else:
  cnt2=n//2
  cnt3=n-cnt2
  print('{:.10f}'.format(cnt3/n))

Submission status: Accepted

Solution code:
n = int(input())
li = []
for i in range(n):
    li.append(i+1)

odd = []
for i in range(n):
    if(li[i]%2==1):
        odd.append(li[i])

print(format(len(odd)/n, '.10f'))

Submission status: Accepted

Solution code:
n = int(input())
print('{:0<10}'.format(((n+1)//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:
n = int(input())

a = (n+1)//2

print(a/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p = 1 - (N // 2) / float(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 = int(input())
m = sum(1 for i in range(1,n+1) if i%2 == 1)
print(m/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:
a = int(input())
print(1-(a//2)/a)

Submission status: Accepted

Solution code:
n = int(input())
li = []
for i in range(1,n+1):
    li.append(i)
ki = li[::2]
print(len(ki)/len(li))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(range(1,n+1))
on=a[0::2]

print(len(on) / n)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

#単入力
n=int(input())

def evenjudge(obj):
    if obj %2!=0:
        return False
    else:
        return True

if evenjudge(n)== True:
    print(0.5)
else:
    print(((n+1)/2)/n)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math
from bisect import bisect_left

n = getN()

ans = n // 2 + (n % 2 == 1)

print(ans/n)

Submission status: Accepted

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

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())
if N%2 == 0:
  print('{:.10f}'.format((0.5)))
else:
  print('{:.10f}'.format((N//2+1)/N))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

def solve():
    N = int(input())
    odd_num = (N+1)//2
    print(odd_num/N)

if __name__ == "__main__":
    solve()

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:
n = int(input())
if n == 0:
    print(0)
elif 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(N/2.0/N)
else:
  print((N+1.0)/2.0/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())

a = int(n / 2)
b = n % 2

c = a + b

print(c/n)

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
odds = -(-N//2)
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 = cnt + 1

print(cnt/n)

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


    N = II()
    if N % 2 == 0:
        print(0.5)
    else:

        print(((N-1)//2+1)/N)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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


if n % 2 == 0:
    print(0.5)
else:
    print((n - math.floor(n/2))/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
if (N==1):
  print(1.0)
elif(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(1/2)
else :
    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:
  ans = 0.5
else:
  ans = (n/2+0.5)/n
  
print(ans)

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:
x=int(input())
print(1.0-(x//2)/x)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

# print(N)

# print(int(N / 2) + (N % 2))

print((int(N / 2) + (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:
N=int(input())
k=0
for i in range(N+1):
    if i%2==1:
        k+=1
print(k/N)

Submission status: Accepted

Solution code:
A = int(input())
mod = A%2


if mod==0:
  print("0.5")
else:
  print((A+1)/(A*2))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
if n == 1:
    print(1/1)
else:
    print((int(n / 2) + (n % 2)) / 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:
def prob(n):
    if n%2==0:
        count=n/2
    else:
        count=(n+1)/2
    return count/n
a=int(input())
p=prob(a)
print("{0:.10f}".format(p))

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
    ans = n // 2
else:
    ans = n // 2 + 1

print(ans / n)

Submission status: Accepted

Solution code:
N  = int(input())
s = [float(i) for i in range(1,N + 1)]
cnt =0.0
for i in s:
    if i % 2 != 0:
        cnt += 1
tmp = float(len(s))
print(float(cnt/tmp))

Submission status: Accepted

Solution code:
N = int(input())

if (N % 2) != 0:
    odd_num = (N - 1) / 2
    odd_p = (odd_num + 1)/N
    print(odd_p)
else:
    odd_num = N/2
    odd_p = odd_num/N
    print(odd_p)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0:
    print(str.format('{0:.9f}', (n//2)/n))
else:
    print(str.format('{0:.9f}', ((n//2)+1)/n))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(N: int):
    if N % 2 == 0:
        return 0.5
    else:
        return ((N+1) // 2 )/ N


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
    p=solve(N)
    print(p)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
p = (n+1) // 2
print(float(p)/float(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
n = [i for i in range(N + 1)]
notodds = n[1::2]
ans = len(notodds) / N

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

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0:
  ans = (n / 2) / n
else:
  b = n // 2
  ans = (b + 1) / 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:
  ans = 0.5
else:
  ans = (N + 1) / N / 2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

a=int(input())
print(str((float((a+1)//2)/a)))

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())
count = 0
for i in range(1, N+1):
    if i % 2 != 0:
        count += 1

print(count/N)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

if N%2==0:
  #偶数
  Ans=(N//2)/N
else:
  #奇数
  Ans=((N//2)+1)/N
  
print(Ans)

Submission status: Accepted

Solution code:
a=int(input())

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

print(count/a)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
  print(0.500000)
else:
  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:
N = int(input())
n = [i for i in range(1, N+1)]

odd = 0
for i in n:
    if i % 2 == 1:
        odd += 1

print(odd/N)

Submission status: Accepted

Solution code:
import sys

N = int(sys.stdin.readline())

odds = N//2 + 1 if N&1 else N//2
s = "{:.8f}".format(odds/N)
print(s)

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
L=range(1,N+1)
G=list(filter(lambda x:x%2==0,L))

print(1-len(G)/len(L))

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if N == 1:
    res = 1
else:
    bunsi = N // 2 + 1 if N % 2 == 1 else N // 2
    res = bunsi / N

print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ev = N // 2
od = N - ev

print(od / N)

Submission status: Accepted

Solution code:
def main():
    n, = map(int, open(0).read().split())

    ans = ((n+1) // 2) / n
    print(ans)
    return()

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
sm = 0
num = 0
for i in range(1, N+1):
    sm += 1
    if i % 2 == 1:
        num += 1

print(num / sm)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    n = list(range(1, int(input()) + 1))
    print(len([i for i in n if i % 2 == 1]) / len(n))


if __name__ == "__main__":
    main()

Submission status: Accepted

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