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

Solution (Python):










import sys
import os
from io import IOBase, BytesIO


def main():
    n = int(input())
    if n & 1:
        x = n // 2 + 1
        print(x / n)
    else:
        print(0.5)


BUFSIZE = 8192


class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill():
            pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill()
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        py2 = round(0.5)
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2 == 1:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode("ascii"))
            self.read = lambda: self.buffer.read().decode("ascii")
            self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)


def get_array():
    return list(map(int, sys.stdin.readline().split()))


def get_ints():
    return map(int, sys.stdin.readline().split())


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


if __name__ == "__main__":
    main()

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
if n%2==0:
    print(1/2)
else:
    print((n//2+1)/n)

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

Solution (Python):
a = int(input())
x = a//2
y = (a+1)//2
print(y/(x+y))

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

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

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

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

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

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

Solution (Python):
import sys
from collections import defaultdict, deque
from functools import reduce
import math

input = sys.stdin.readline


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

if __name__ == '__main__':
    main()

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

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

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

odd = N//2

print((N-odd)/N)

Solution (Python):



s = int(input())

sho = s // 2

print(1.0 - (sho / s))

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

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

Solution (Python):


n=int(input())
odd=-(-n//2)
print(odd/n)

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

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

print(odd / N)

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

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

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

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

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

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

print(cnt/N)

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


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

Solution (Python):
a = int(input())

print("%f" % (1-(a//2)/a))

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

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

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

Solution (Python):
N = int(input())
N2 = (N-1)//2+1

print(N2/N)

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

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    if n%2==0: print(0.5)
    else: print((n//2+1)/n)
resolve()

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

print(math.ceil((N/2))/N)

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

Solution (Python):
n = int(input())

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

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

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

Solution (Python):
n = int(input())

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

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

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

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

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    n = I()
    print((n-(n>>1))/n)
    return


def B():
    n,k = LI()
    h = LI()
    ans = 0
    for i in h:
        if i >= k:
            ans += 1
    print(ans)
    return


def C():

    return


def D():

    return


def E():

    return


def F():

    return


if __name__ == "__main__":
    A()

Solution (Python):

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

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

Solution (Python):
n = int(input())

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

print(k/n)

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

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

Solution (Python):
n = int(input())
if n % 2 == 1:
    ans = 1 - (n//2) / n
else: ans = 0.5

print(ans)

Solution (Python):
n=int(input())
print(round(n/2+0.1)/n)

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

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

Solution (Python):

N = int(input())

e = N // 2
o = N - e

print (o / N)

Solution (Python):
def main():
    N=int(input())
    if N%2==0:
        return 0.5
    else:
        return 1-((N//2)/N)

print(main())

Solution (Python):
N = int(input())
if (N//2)*2 == N:
    print(0.5)
else:
    print((N+1)/(2.0*N))

Solution (Python):

n = int(input())

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

Solution (Python):

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
odd = 0
evn = 0
for i in range(1, n+1):
    if i%2:
        odd += 1
    else:
        evn += 1

print(odd/(odd+evn))

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7



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

print(count / N)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()

  return -(-n//2)/n


print(main())

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

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

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

Solution (Python):
import sys
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()

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

print(ans/N)

Solution (Python):
N = int(input())
even = N // 2
odd = N - even
print(odd/N)

Solution (Python):
def main():
    N = int(input())

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

    print(cnt / N)

main()

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    return math.ceil(N/2)/N


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

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

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

Solution (Python):
import math

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

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

Solution (Python):

import sys
sys.setrecursionlimit(300000)


def solve(N: int):
    ret = 1.0 - (N // 2) / N
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N=int(input())
print((N-N//2)/N)

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

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


if __name__ == "__main__":
    main()

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

Solution (Python):
import sys
input = sys.stdin.readline

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


if __name__ == "__main__":
    main()

Solution (Python):

import sys
import collections
sys.setrecursionlimit(4100000)

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

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

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

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

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

Solution (Python):

import sys
INF = float("inf")


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


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)


if __name__ == '__main__':
    main()

Solution (Python):

a = int(input())
print((a-int(a/2))/a)

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

Solution (Python):
N = input()
print "%.10f"%((N+1)/2/float(N))

Solution (Python):
import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')

def sol():
    N = int(input())

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

sol()

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

n = int(input())



print(1-n//2/n)

Solution (Python):
import sys
input = sys.stdin.readline

N=int(input())

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

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

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

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

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

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
a = 0
for i in range(1, N +1):
    if i & 1:
        a += 1

print(a / N)

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

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

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

Solution (Python):
mod = 1000000007
MOD = 998244353
ii = lambda :  int(input())
si = lambda :  input()
dgl = lambda : list(map(int, input()))
f = lambda :   map(int, input().split())
il = lambda :  list(map(int, input().split()))
it = lambda :  tuple(map(int, input().split()))
ls = lambda :  list(input())
n=ii()
print(((n+1)//2)/n)

Solution (Python):
import sys
from collections import defaultdict, deque
from heapq import *
sys.setrecursionlimit(200000)
input = sys.stdin.readline


N = int(input())






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

print(s / N)

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

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

Solution (Python):
n = int(input())
ans = 0

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

print(ans/n)

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()

    ans = 1-(N//2)/N
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    
    n = int(input())
    cnt = (n + 1) // 2
    
    print(cnt / n)
    
    return 0

main()

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

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

Solution (Python):
import sys
from fractions import gcd
from itertools import groupby as gb
from itertools import permutations as perm
from itertools import combinations as comb
from collections import Counter as C
from collections import defaultdict as dd
sys.setrecursionlimit(10**5)
def y(f):
    if f:
        print('Yes')
    else:
        print('No')
def Y(f):
    if f:
        print('YES')
    else:
        print('NO')

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    print(1 - n // 2 / n)


if __name__ == '__main__':
    slove()

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

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

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

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

Solution (Python):
x = int(input())
f = x // 2
print((x-f)/x)