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

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

Submission status: Accepted

Solution code:
A=int(input())
cnt=0
sum=0

for i in range(1,A+1):
  sum+=1
  if i%2==1:
    cnt+=1
    
print(cnt/sum)

Submission status: Accepted

Solution code:
# coding: UTF-8
N = int(input())
ans = -(-N // 2) / N
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if N == 1:
  print(1)
elif N % 2 == 0:
  kisuu = int(N / 2)
  print(kisuu / N)
else:
  kisuu = int(N / 2) + 1
  print(kisuu / 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:
import sys


input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    odd_num = int((N+1)/2)
    ans = float(odd_num/N)
    print(ans)

solve()

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(N/2/N)
else:
    print((N//2+1)/N)

Submission status: Accepted

Solution code:
N = int(input())

import math

i = math.ceil(N/2)

print(i/N)

Submission status: Accepted

Solution code:
N = int(input().rstrip())
a = 0

for i in range(N+1):
  #print(i)
  if (i % 2) == 1:
    a += 1

print(a/N)

Submission status: Accepted

Solution code:
N = float(input())

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

Submission status: Accepted

Solution code:

num = int(input())
num2 = int(num / 2)

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(kisuu/n)

Submission status: Accepted

Solution code:
N = int(input())
k = 0 if N % 2 == 0 else 1

print(((N // 2) + k) / 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:
  print(1/2)
else:
  print((n+1)/2/n)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
ans = 0
for i in range(N):
    if i % 2 == 0:
        ans += 1

print(ans / N)

Submission status: Accepted

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

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())

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());
ki = 0;
for i in range(1,n+1) :
	if i % 2 == 1 :
		ki += 1;

print(ki / n);

Submission status: Accepted

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

Submission status: Accepted

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

k = (N+1)//2

print( k/N )

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()[0]

def solve():
    ans = 0
    return - (- N // 2) / N

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

Submission status: Accepted

Solution code:
n = int(input())

ls = list(range(1, n+1))

g = ls[1::2]
k = ls[::2]

print(1 / (len(ls) / len(k)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import numpy as np

    
##################################################################

if __name__ == "__main__":
    Input1 = [input() for i in range(1)]
    N = int(Input1[0])
    #N = list(map(int,Input1[0].split()))

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

    #print(''.join(map(str,S[i])))

Submission status: Accepted

Solution code:
n = int(input())

a = (n + 1) // 2

r = a / n

print(r)

Submission status: Accepted

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

import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = int(lines[0])

    return (n,)


def solve(n):

    result = 0.5
    if n % 2 == 1:
        odd = (n-1) / 2 + 1
        result = odd / n

    return result


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
def main():
    N = int(input())

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 0:
    temp = N // 2
else:
    temp = N // 2 + 1

res = temp / N
print(res)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
i=1
count = 0
while i <= n:
    if i % 2 == 1:
        count+=1
    i+=1

print(count/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 :
    ans = 1/2
else:
    ans = ((N//2)+1) / N
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

print(o/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
print(((n//2)+1)/n if n%2!=0 else (n//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:
import sys
import heapq
import bisect
import itertools

mod = 10**9+7
dd = ((-1,0),(1,0),(0,-1),(0,1))

def I(): return(int(sys.stdin.readline()))
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 S(): return(sys.stdin.readline()[:-1])
def IR(n): return([I() for _ in range(n)])

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

def LCM(a,b):
    return a * b // GCD(a,b)

def Eratosthenes(N):
    r = [True]*(N+1)
    r[0] = False
    r[1] = False
    i = 2
    while i*i<=N:
        if r[i]: 
            j = i
            while i*j<=N:
                prime[i*j]=False
                j+=1
        i+=1
    return(r)

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

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

Submission status: Accepted

Solution code:
import math
n = int(input())
print(1 if n==1 else math.ceil(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())

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

Submission status: Accepted

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

if(n % 2 == 1):
  odd = int(n/2 + 1)
else:
  odd = int(n/2)

even = n/2

print(odd / 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//2+1)+(n//2)))

Submission status: Accepted

Solution code:
#coding: utf-8

a = int(input())
ans = 0

if a%2 == 1:
    ans = ((a//2) + 1) / a
else:
    ans = (a/2) / a

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import string
import sys
from itertools import chain, dropwhile, takewhile

INF = float("inf")


def read(
    *shape, f=int, it=chain.from_iterable(sys.stdin), whitespaces=set(string.whitespace)
):
    def read_word():
        w = lambda c: c in whitespaces
        nw = lambda c: c not in whitespaces
        return f("".join(takewhile(nw, dropwhile(w, it))))

    if not shape:
        return read_word()
    elif len(shape) == 1:
        return [read_word() for _ in range(shape[0])]
    elif len(shape) == 2:
        return [[read_word() for _ in range(shape[1])] for _ in range(shape[0])]


def readi(*shape):
    return read(*shape)


def readi1(*shape):
    return [i - 1 for i in readi(*shape)]


def readf(*shape):
    return read(*shape, f=float)


def reads(*shape):
    return read(*shape, f=str)


def arr(*shape, fill_value=0):
    if len(shape) == 1:
        return [fill_value] * shape[0]
    elif len(shape) == 2:
        return [[fill_value] * shape[1] for _ in range(shape[0])]


def dbg(**kwargs):
    print(
        ", ".join("{} = {}".format(k, repr(v)) for k, v in kwargs.items()),
        file=sys.stderr,
    )


def main():
    n = readi()
    print(sum(i % 2 == 1 for i in range(1, n + 1)) / n)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = float(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
from collections import deque
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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


def solve():
  n = int(input())
  a = (n+1)//2
  print(a/n)
solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from copy import deepcopy
from collections import deque, defaultdict
from operator import mul
from functools import reduce
sys.setrecursionlimit(20000000)

# input = sys.stdin.readline


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

    if n % 2:
        print(((n - 1) / 2 + 1) / n)
        sys.exit()
    else:
        print(0.5)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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)
elif n == 1:
    print(1.0)
else:
    print((n//2+1)/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

N = [int(x) for x in stdin.readline().rstrip().split()]
n = int(N[0])
if n % 2 == 0:
    print(0.5)
else:
    k = n // 2 + 1
    print(k/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

bunshi = 0
for i in range(1, N+1):
    if (i % 2) == 1:
        bunshi += 1
print(bunshi/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:
# -*- coding:utf-8 -*-

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())
# s=input()
# l=list(map(int,input().split()))
if n%2==0:
  x=n//2
else:
  x=n//2+1
print(x/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())
count = 0
for i in range(N):
  if((i+1)%2 == 1):
    count += 1
ans = count/N
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


n = int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
number = int(input())
if number%2 ==0:
  child = number/2
elif number%2==1:
  child = (number+1)/2
value =child/number
print(value)

Submission status: Accepted

Solution code:
n = int(open(0).read())
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:
    num = N // 2 + 1
else:
    num = N // 2

ans = num / N
print('{:.06f}'.format(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())


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()
# template


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

even = n // 2

prob = (n - even) / n

print(prob)

Submission status: Accepted

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

result=k/n

print(result)

Submission status: Accepted

Solution code:
def myinput(rownum):
    res = []
    for i in range(rownum):
        temp = input().split(" ")
        res += temp
    return res

def main():
    r = int(myinput(1)[0])
    if r == 1:
        print(1)
    elif r % 2 == 0:
        print(0.5)
    else:
        print((int(r/2)+1)/r)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
n = float(input())
print(math.floor((n+1)/2)/n)

Submission status: Accepted

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

Submission status: Accepted

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

print(odd / 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:
ｎ = int(input())
if n == 1:
    print(1)
    exit()
print(((n//2) + (n % 2)) / n)

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
from pprint import pprint
sys.setrecursionlimit(2147483647)


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
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)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007



from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
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)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007

n = I()

print(len([i for i in range(1, n + 1) if i % 2]) / n)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

a = 1 - (n//2)/n
print(a)

Submission status: Accepted

Solution code:

N = int(input())
if N % 2 == 0:
    A = 1*0.5000000
    print(A)
else:
    B = (N/2)-0.5
    A = (N-B)/N
    print(A)

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

if a%2 == 0: #Even
  print( 0.5)
else: #Odd
  print( ((a // 2) +1) / a)

Submission status: Accepted

Solution code:
import sys

N=int(sys.stdin.readline().rstrip())
even=N//2
print(1-(even/N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

n = int(input())

print(ceil(n / 2) / n)

Submission status: Accepted

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

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

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 sys
input = sys.stdin.readline

N = int(input())

OddCount = N // 2 + N % 2
print(OddCount / 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())

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

Submission status: Accepted

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

print(c/N)

Submission status: Accepted

Solution code:
n = int(input())

even_qty = n//2
odd_qty = n//2

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


print("{:.10f}".format(odd_qty/n))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
odd_num = n//2
if n % 2 != 0:
    odd_num += 1
print(odd_num/n)

Submission status: Accepted

Solution code:
N = int(input())

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

print (even/(even+odd))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
odd = 0
count = 0
ans = 0.0
for i in range(N):
    count +=1
    if(count %2 == 1):
        odd += 1
    else:
        continue
ans = odd /count
print(round(ans,6))

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((n/2)/n)
else:
    print((n//2 + 1) / n)

Submission status: Accepted

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

print(count/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)
elif n//2 == 0:
  print(n/2)
else:
  print(((n+1)//2) /n)

Submission status: Accepted

Solution code:
n = int(input())

odds = len([x for x in range(1, n + 1) if x % 2 == 1])
print(odds / n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt/N)

Submission status: Accepted

Solution code:
N = int(input().split()[0])

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

Submission status: Accepted

Solution code:
N = int(input())
if N == 1:
    print(1)
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
print(1 - a / n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
print(str(round(((N+1) // 2) / N, 7)))

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

Submission status: Accepted

Solution code:
import math
a=int(input())
if(a%2==0):
  print(0.5000)
else:
  print(math.floor(a/2+1)/a)

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:
# -*- coding: utf-8 -*-
# 整数の入力
N = int(input())
if N%2==1:
  print("{}".format((N//2 + 1) / N))
else:
  print("{}".format((N//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=float(input())

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

print(float(count/N))

Submission status: Accepted

Solution code:
a = int(input())

if a%2 == 0 :
  print("0.5000000000") 
else  :
  temp = a//2 +1 
  temp = temp/a 
  print(temp)

Submission status: Accepted

Solution code:
n = int(input())

answer = 1 - (n // 2) / n 
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

evens = N//2
odds = N - evens

result = odds / N

print(result)