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())
a=[x+1 for x in range(n)]
cnt=0
for i in a:
  if(i%2!=0):
    cnt+=1
print("{:.6f}".format(cnt/n))

Submission status: Accepted

Solution code:
N=list(map(int,input().split()))
x=[]
for i in range(1,(N[0]+1)):
    x.append(i)
even_x=0  
odd_x=0  
for j in range(1,(x[-1]+1)):
    if j/2==int(j/2):
        even_x+=1
    else:
        odd_x+=1
output=odd_x/(odd_x+even_x)
print(output)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
A=input()
N=int(A)
B=int((N+1)/2)
print('{:.9f}'.format(float(B)/float(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())

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

odds_ratio = odds_counter / N
print(odds_ratio)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = float(input())

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
a = np.arange(1, N+1)
print((a % 2).mean())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
N = int(raw_input())

P = 1.0*((N-1)/2 +1) / N
print "{:12.10f}".format(P)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

ans = 1.0
if n > 1 and n%2==1:
  ans = (n//2 + 1)/n
elif n%2==0:
  ans = 0.5
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
class Odds_of_oddness:
  def __init__(self,n):
    self.n = n
    self.l = range(1,n+1) 
    self.count = 0
  def solve(self):
    for i in self.l:
      if i % 2 == 1:
        self.count += 1
    return self.count/len(self.l)    
  
ooo = Odds_of_oddness(n)
ans = ooo.solve()  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

if a % 2 == 1:
	tmp = a // 2 +1
else:
	tmp = a / 2 

print('{:.6f}'.format(tmp / a))

Submission status: Accepted

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

Submission status: Accepted

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

print float(count) / float(n)

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

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

Submission status: Accepted

Solution code:

def main():
    N = int(input())
    print(len(range(1,N+1,2))/len(range(1,N+1)))
    return 

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
# n,m = map(int,input().split())
if n == 1:
  print(1)
elif n % 2 == 0:
  print(0.5)
else:
  print((n // 2 + 1) / n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    print((n - n // 2) / n)


if __name__ == '__main__':
    solve()

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())
k=int(n/2)
print(1-(k/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())
if  (n%2 == 0):
        print(".50000000")
else:
    n=(n+1)/(2*n)
    print('%.6f'%n)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


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


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve(N):
    o, e = 0, 0
    for i in range(1, N + 1):
        e += i % 2 == 0
        o += i % 2 == 1

    return o / (e + o)


def main():
    N = int(input())
    print(solve(N))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n=int(raw_input())
d=(n+1)/2
r=float(d)/n
print '%.10f' % r

Submission status: Accepted

Solution code:
# 2019-11-18 23:58:23(JST)
import sys
# import collections
import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 


def main():
    n = int(sys.stdin.readline().rstrip())
    ans = math.ceil(n / 2) / n
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# 2019-11-18 23:58:23(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 


def main():
    n = int(sys.stdin.readline().rstrip())
    if n % 2 == 0:
        ans = 0.5
    else:
        ans = (n // 2 + 1) / n

    print(ans)


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("{:.6f}".format(c/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%2==0:
    print(0.5)
else:
    print((n//2+1)/n)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

N = int(N)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

Solution code:
# coding:utf-8
n = input()


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

Submission status: Accepted

Solution code:
# coding:utf-8
n = input()  # 获取输入数字N

# 根据获取的数据n，进行后续代码的补充
if n % 2 == 0:
    print 0.5
else:
    print (n+1)*1.0/2/n

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def abc142_a():    
    n = int(input())
    # 奇数の数 / N　で確率が計算できる、

    # 偶数の数はn//2(2で割って小数点以下を切り捨てる)
    even_cnt = n // 2
    print((n - even_cnt) / n)

if __name__ == '__main__':
    abc142_a()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = (N // 2 + N % 2) / N

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a=int(input())
b=a//2
c=a%2
Ans=(b+c)/a
print(Ans)

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())
odds = list(filter(lambda x: x % 2 != 0, range(1, N + 1)))
print("{:.10f}".format(len(odds) / float(N)))

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
    print(n/2/n)
if n % 2 == 1:
    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:
# -*- coding: utf-8 -*-
n = int(input())

q, mod = divmod(n, 2)
if mod == 1:
    print((q+1)/n)
else:
    print(0.5)

Submission status: Accepted

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

print(float(d))

Submission status: Accepted

Solution code:
import math

n=int(input())
oddCnt=math.ceil(n/2)
ret=(oddCnt/n)
print("{:.10f}".format(ret))

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( '{:.10g}'.format( odd / n ) )
     
if __name__ == '__main__': main()

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

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ct = 0
    for i in range(1,n+1):
        ct += i%2
    ans = ct/n
    print('{:.15f}'.format(ans))

if __name__ == "__main__":
    main()

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*N))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
a = 0

if N % 2 == 0:
    a = 1 / 2
    print(a)
    
else:
    s = N // 2
    a = (s + 1) / N 
    a = round(a, 10)
    print(a)

Submission status: Accepted

Solution code:
N =float(input())
n2 = N/2
N2 = N%2
n3 = (n2/N)+(N2/(2*N))
print(n3)

Submission status: Accepted

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

Submission status: Accepted

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

if x == 0:
    ans = 1 / 2
else:
    ans = ((N - 1)/2 + 1) / N

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read

N = int(read())
odd = (N + 1) // 2
print(odd / N)

Submission status: Accepted

Solution code:
import math
n = int(input())
a = math.ceil(n/2)
b = n-a
if n == 1:
  print("1")
else:
  print(a/n)

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(M / 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:
from math import ceil

N = int(input())

print(ceil(N/2) / N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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=[]
for i in range(1,N+1):
    if i%2 != 0:
        odd.append(i)
print(len(odd)/N)

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
if n&1==1 :
    print((n+1)/2.0/n)
else :
    print(n/2.0/n)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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

else:
    ans = (n + 1) / (2 * n)

print(ans)

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())
print(int(n/2+0.5)/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:
# ABC 142: A – Odds of Oddness
n = int(input())
print('{:.7f}'.format(0.5) if n % 2 == 0 else '{:.7f}'.format((n // 2 + 1) / 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:
#Odds of Oddness
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:
    b = (int(a/2)+1)/a
    print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
lst = []
for a in range(1, N + 1):
	if a % 2 == 1:
		lst.append(a)
print(len(lst) / 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+1)/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(input_line):
    """Test Case
    >>> print_ans(4)
    0.5000000000
    >>> print_ans(5)
    0.6000000000
    >>> print_ans(1)
    1.0000000000
    """
    q, mod = divmod(input_line,2)
    print((q + mod)/input_line)

if __name__ == '__main__':
    print_ans(int(input()))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    # 偶数の数はn//2
    print((n - (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 // 2 + 1) / n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

evens = []
for i in range(1, n+1):
    if i % 2 == 1:
        evens.append(i)
        
print(len(evens)/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())
even = 0

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

print(1-even/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
print(1 - ((n//2)/n))
# Hope it works 
# Hope it works
# Not 50 char yet??????????????????????????

Submission status: Accepted

Solution code:
n=int(input());
count=0
for i in range(1,n+1):
    if((i%2)!=0):
        count+=1
print('%.10f'%(count/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())
# test line
# test line
a = n//2 + n%2

print(a/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
c=0
for i in range(1,n+1):
    if(i%2!=0):
        c+=1
print('%.10f'%(c/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:
N = int(input())
count = 0
for i in range(1, N + 1):
    if i % 2 == 1:
        count = count + 1
print(count/N)

Submission status: Accepted

Solution code:
import unittest


class TestA(unittest.TestCase):
    def test_4(self):
        # (actual_value, expected_value)
        self.assertEqual(think(4), 0.5)

    def test_5(self):
        self.assertEqual(think(5), 0.6)

    def test_1(self):
        self.assertEqual(think(1), 1.0)


def solve():
    n = read()
    result = think(n)
    write(result)


def read():
    return read_int(1)[0]


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(data):
    if data % 2 == 0:
        return 0.5
    return ((data + 1) // 2) / data


def write(result):
    print(result)


if __name__ == '__main__':
    # import sys
    # sys.setrecursionlimit(10000)
    # unittest.main()
    solve()

Submission status: Accepted

Solution code:
from decimal import Decimal, ROUND_HALF_UP

a=int(input())

b= Decimal(str(a/2)).quantize(Decimal('0'), rounding=ROUND_HALF_UP)

c = b/a

print(c)

Submission status: Accepted

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