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())
b = -(-N//2)
print(b/N)

Submission status: Accepted

Solution code:
import sys
from math import ceil

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    print(ceil(N/2)/N)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

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

print( ( a // 2 + a % 2 ) / a )

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    odd = 0

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

    print(odd/n)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools

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

    return 0
if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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:
t = int(input())
a = [i+1 for i in range(t)]
count = 0

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

print(float(count) / float(t))

Submission status: Accepted

Solution code:
import sys

line = sys.stdin.readline()
n = int(line)
if n == 1:
    print(1)
elif n % 2 == 0:
    print(0.5)
else:
    print(0.5 + (0.5 / n))

Submission status: Accepted

Solution code:
n = float(input())

print(float((n//2+(n-n//2*2))/(n//2*2+(n-n//2*2))))

Submission status: Accepted

Solution code:
n = int(input())
l = list(range(1,n+1))

even = sum(x%2==0 for x in l)
odd = n - even

print(odd/n)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

num = 0

for i in range(N):
    if i % 2 == 0:
        num += 1
prob = float(num / N)
print(prob)

Submission status: Accepted

Solution code:
N = int(input())

odd = 0

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

print(odd / N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
num = math.ceil(N/2)
print(format(num/N,'.10f'))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
n2 = N % 2

if n2 == 0:
  print(float(N/2)/N)
else:
  n3 = (N-1)/2
  print(float((n3+1))/N)

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = int(input())

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
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 list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()

    return (n+1)//2 / n


print(main())

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=INT()
    print((round(a/2+0.1)/a))
if __name__ == '__main__':
    do()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

s = sum([i % 2 != 0 for i in range(1, N+1)])
print(s / N)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
print(-(-n//2)/n)

Submission status: Accepted

Solution code:
n = int(input())

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

print(sum / 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())
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())

print((n-n//2)/n)

Submission status: Accepted

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

Submission status: Accepted

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

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())
g = n // 2
print((n-g)/n)

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(a / n)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
if sys.platform in (['ios','darwin','win32']):
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

def main():
	N = INT()
	total = N
	cnt = 0
	for i in range(1, N+1):
		if i%2: cnt += 1
	
	print(cnt/total)

if __name__ == '__main__':
	main()

Submission status: Accepted

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


 
if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
a=float(input())
print(((a+1)//2)/a)

Submission status: Accepted

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

Submission status: Accepted

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

even = [0]
odd = [0]
for i in range(n-1):
    if i % 2 == 0:
        even.append(i)
    else:
        odd.append(i)

print(n if n == 1 else len(odd)/n)

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
a = int(input())

print("{:.8f}".format(((a + 1) // 2) / a))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#N, W = map(int, input().split())
N = int(input())

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

Submission status: Accepted

Solution code:
N = input()
A = int(N)
arr = []
for i in range(1,A+1):
  if i%2 != 0:
    arr.append(i)
  else: continue
print(len(arr)/A)

Submission status: Accepted

Solution code:
n=int(input())
print(-(-n//2)/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())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

N=II()

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

Submission status: Accepted

Solution code:
n = int(input().strip())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i=int(input())
j=i%2
k=0.0
if j==0:
  k=0.5
else:
  k=float(((i-1)/2+1)/i)
print(k)

Submission status: Accepted

Solution code:
import math
N = int(input())
a=N//2
b=N-a

print(b/N)

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:
# スペース区切りの整数の入力
#a, b = map(int, input().split())

a = int(input())
A = a
b = 0

while (a>0):
    if a %2 == 1:
        b+=1
    a -= 1
print(float(b/A))

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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:
    print(1/2)
else:
    print((N-(N//2))/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:
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 % 2 == 0:
    print('{:.10f}'.format((N / 2) / N))
else:
    print('{:.10f}'.format(((N+1) / 2) / 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:
N=int(input())
s=0
for i in range(1,N+1):
  if i%2==0:
    s=s
  else:
    s+=1
c=s/N
print(c)

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
cnt = int(input())
cnt_odd=[]


for i in range(cnt+1):
    
    if i%2==1:
        
        cnt_odd.append(i)

print(len(cnt_odd)/cnt)

Submission status: Accepted

Solution code:
from sys import stdin

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

arr = [x for x in range(1,n+1) if x%2!=0]

print('{:.8f}'.format(len(arr)/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:
n = int(input())
odd = []

for i in range(n+1):
  if i%2 != 0:
    odd.append(i)
    
ans = len(odd)/n
print(ans)

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) / n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
q,r=divmod(n,2)
if r==1:
  print((q+1)/n)
else:
  print(q/n)

Submission status: Accepted

Solution code:
a=int(input())
if a%2==0:
    print('{:.6f}'.format(1/2))
else :
    print('{:.6f}'.format((a+1)/2/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:
from math import ceil
N = int(input())
print(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())
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:
    print(0.5)
elif N%2 == 1 and N != 1:
    print(-(-N//2)/N)
elif N == 1:
    print(1)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
odds = [i for i in range(1, n+1) if i % 2 != 0]
print(len(odds) / 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:
a = int(input())
if a%2:print((a//2+1)/a)
else:print(0.5)

Submission status: Accepted

Solution code:
N = float(input())

a = float(N-int(N/2))

print(a/N)

Submission status: Accepted

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

p /= n
 
print(p)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

m = n // 2 

print((n-m)/n)

Submission status: Accepted

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

print(count/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
k=int(input())

a=k//2

print(1-a/k)

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

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

print(odd / N)

Submission status: Accepted

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

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

print(odd_num / N)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import math
import sys
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
N=int(input())
if N%2==1:
    s=N//2+1
else:
    s=N//2
print('{:.8f}'.format(s/N))

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Odds pf Oddness
n = int(input())

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

print(odd_n/n)

Submission status: Accepted

Solution code:
i = int(input())

print(1-(i//2)/i)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

def solve(N: int):
    a = 0
    if (N % 2 == 0):
        a = N / 2
    else:
        a = math.floor(N / 2)+1
    print(a/N)
    return


# Generated by 1.1.6 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())
s = n // 2
l = n % 2
to = (s + l) / n
print(to)

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
# Odds of Oddness
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())

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

print(count / N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input().strip())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys

def main():
    n = int(input())
    odd = int(n/2) + (n%2)
    print('%.10f'%(odd/n))

if __name__ == '__main__':
    sys.exit(main())

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
#ABC142-A Odds of Oddness
N = int(input())
print(0.5 if N%2 == 0 else (N//2+1)/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())
ans = 0.5 if N % 2 == 0 else ((N + 1) / 2) / N

print(ans)

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

# 整数 > 整数型
def I(): return int(input())

# 整数列 '1 2 3 4' > 整数型リスト
def IsIl(): return list(map(lambda x: int(x), input().split()))

# 改行挟む整数列　'1/n 2/n 3/n' > 整数型りすと
def InIl(n): return [input() for i in range(n)]

# 整数列 '1 2' > 整数型タプル
def IsIt(): return map(lambda x: int(x), input().split())

# 改行挟む整数列　'1\n 2\n 3\n' > 整数型たぷる
def InIl(n): return map(input() for i in range(n))

# 文字列 'abcd' > 文字型リスト
def SsSl(): return list(map(lambda x: x, input()))

# 整数 '1234' > 整数型リスト

# 文字列 'aba' > 辞書（文字型:個数）{'a':2,'b':1}
def SSd():
    from collections import defaultdict
    A = input() # [int(i) for i in input().split()]
    dd=defaultdict(int)
    for a in A:
        dd[a]+=1
    return dd

#リストにn個要素を読み込む

# その他アルゴリズムテンプレート
# https://qiita.com/chun1182/items/ddf2b6cba932b2bb0d4e

n = I()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

print(x)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
print(sum(map(lambda x: x%2 == 1, range(1, n+1)))/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    N = int(input())
    c = 0

    for x in range(1, N+1):
        if(x%2==1):
            c+=1

    print("{0}".format(float(c/N)))

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:
n=int(input())
print(((((n-1)//2)+1)/n,1/2)[n%2==0])

Submission status: Accepted

Solution code:
N=int(input())

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

print(odd/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import decimal
import math
decimal.getcontext().prec = 10
n = decimal.Decimal(int(input()))

print(decimal.Decimal(math.ceil(n/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())
odd = 0

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

print(odd/n)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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