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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N = int(input())

    if N % 2 == 0: # Nが偶数のとき、偶数と奇数の数が等しい
        print("0.5")
    else:
        odd_number  = (N + 1) / 2
        print(odd_number / N)

solve()

Submission status: Accepted

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

Submission status: Accepted

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

a = b = int(input())
b /= 2
ans = math.ceil(b)/a
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:
from collections import Counter,defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue
sys.setrecursionlimit(10**8)
mod = 10**9+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())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

print(f/n)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-S
N = int(input())
if N % 2 == 0:
    print(0.5)
else:
    X = (N//2 + 1) / N
    print(X)

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

Submission status: Accepted

Solution code:


def main():

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



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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = float(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import sys
#input = sys.stdin.readline
def main():
    N = int( input())
    t = N//2
    print((N-t)/N)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    odd = -(-N//2)
    print(odd/N)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input().split()
N = int(a[0])
ans = 0.5
if N%2 == 0:
    pass
else:
    ans = (N+1)/(2*N)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(N: int):
    if N % 2 == 0:
        print("%.10f" % 0.5)
    else:
        print("%.10f" % ((N+1)/(2*N)))
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

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

N = int(input())
print(1-(N//2)/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())
print(solve(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:
s = int(input())
ans = 0
for i in range(s):
    if i%2 ==0:
        ans+=1
    else:
        pass
count = ans/s
print(count)

Submission status: Accepted

Solution code:
N = int(input())

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+1)/2)/N)

Submission status: Accepted

Solution code:
import sys

#+++++
		
def main():
	a = int(input())
	aa=len([v for v in range(1,a+1) if v % 2 ==1])

	print(aa/a)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

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

if N % 2 == 0:
    print(0.5)
else:
    a = math.ceil(N/2)
    print(a/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:
x = input()
xNum = int(x)

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

print(count/xNum)

Submission status: Accepted

Solution code:
n=int(input());print([0.5,(n+1)//2/n][n%2>0])

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

Submission status: Accepted

Solution code:
n = int(input())

d = n//2
print((n-d)/n)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N = int(input())
    OddNum = (N + 1) // 2
    Rate = OddNum / N
    print(Rate)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
num_list = list(range(1,n+1))
odd_list = num_list[::2]
print(len(odd_list)/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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


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


if __name__ == '__main__':
    main()

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 == 0:
  print(0.0000000000)
  
elif N == 1:
  print(1.0000000000)
  
else:
  a = int(N / 2)
  b = N - a
  c = b / N
  print(c)

Submission status: Accepted

Solution code:
x = int(input())
y = []
y = [x for x in range(1, x + 1) if x % 2 != 0]
z = len(y) / x
print('{:.9f}'.format(z))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

odds = list(filter(lambda x: x % 2 != 0,range(1,n+1)))
print(len(odds) / 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:
if __name__ == '__main__':
  n = int(raw_input())
  if n % 2 == 0:
    print 0.5
  else:
    print (n / 2 + 1) / float(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())
m = int(N/2) + (N % 2)

print(m/N)

Submission status: Accepted

Solution code:
_n = int(input())
_odd = 0.0
_even = 0.0
for _i in range(_n):
  _num = _i + 1
  if _num % 2 == 0:
    _even = _even + 1
  else:
    _odd = _odd + 1
_prob = _odd / (_odd + _even)
print(_prob)

Submission status: Accepted

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

Submission status: Accepted

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

#output
if N % 2 == 0:
    print(0.5)
else:
    print(1-(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())

even = N // 2
print('{:.10f}'.format(1-(even/N)))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())
i=1
c=0
while(i<=n):
  if i%2!=0:
    c+=1
  i+=1
d=c/n
print(d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

elif n % 2 == 0:
    print("0.5")

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

Submission status: Accepted

Solution code:
import math

N = float(input())

print('{:.10f}'.format(1-math.floor(N/2)/N))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

gu = N // 2
ki = N - gu
ans = ki / 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 + 1) / n)

Submission status: Accepted

Solution code:
from math import ceil

if __name__ == "__main__":
    n = int(input())
    print(ceil(n/2)/n)

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

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

Submission status: Accepted

Solution code:
#abc142a
n=int(raw_input())
if n%2==0:
 print 0.5
else:
 print (1.0+n/2)/n

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
#import math
#import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
#ts=time.time()
#sys.setrecursionlimit(10**6)
#input=sys.stdin.readline
show_flg=False
show_flg=True


n=I()
ans=1-(n//2)/n
for i in range(n):
    0
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def func(N):
    count = 0
    for i in range(N):
        if (i + 1) % 2 != 0:
            count += 1
    return count / N

N = int(input())
print(func(N))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil
a = int( input())
print((ceil(a / 2) / a, 1)[a == 1])

Submission status: Accepted

Solution code:
from math import *

def next_int():
    return int(input())

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

n = next_int()
t = 0
for i in range(n):
    if i+1 & 1:
        t += 1
print(t/n)

Submission status: Accepted

Solution code:
N = int(input())
even = N//2
odd = N-even
print(odd/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 = float(input())

import math
n = math.ceil(N/2)

print(n/N)

Submission status: Accepted

Solution code:
N = int(input())

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

p = count/N
# print(count)
print(p)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
print('{:.10f}'.format(math.ceil(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())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import unittest
import sys

def count_odds_of_odd(n):
	#print n
	if n == 1:
		return float(1)
	else:
		odd_count = (n / 2) + (n % 2)
		#print odd_count
		odds_of_odd = float(odd_count) / float(n)
		return odds_of_odd

def read_input():
	#Read the input N
	n = int(sys.stdin.readline())
	return count_odds_of_odd(n)

class testMyCode(unittest.TestCase):
	def test_1(self):
		res = count_odds_of_odd(1)
		self.assertEqual(res, 1)
		res = count_odds_of_odd(4)
		self.assertEqual(res, 0.5)
		res = count_odds_of_odd(5)
		self.assertEqual(res, 0.6)

if __name__ == '__main__':
	res = read_input()
	print res
	#unittest.main()

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

odd = -(-a//2)
even = a//2

print(odd/(odd+even))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
 
    if (N < 0 or N > 100):
        return 0
    array_len = len([N for i in range(1, N+1) if(i%2==1)])
    result = array_len / N
    return result
    
if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf = 10**20

N = int(input())
half = N // 2
print((half + N%2)/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

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

N = I()

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

import math
import os
import sys


DEBUG = 'DEBUG' in os.environ


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


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


def main():
    N = int(inp())
    odds = (N + 1) // 2
    print(odds / N)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC142A - Odds of Oddness
def main():
    N = int(input())
    ans = ((N + 1) // 2) / N
    print(ans)


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

Submission status: Accepted

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

print(x/n)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())

evens = n // 2
odds = n - evens

print(odds / n)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
mod = 1000000007


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def update(x, y, new_value, dp):
    if 0 <= x < len(dp) and 0 <= y < len(dp):
        dp[x][y] = min(dp[x][y], new_value)

def main():
    n=int(input())
    print(1 - (n // 2) / n)

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

n = int(input())

if n % 2:
    print(ceil(n/2)/n)
else:
    print((n//2)/n)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc142/tasks/abc142_a
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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


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

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

Submission status: Accepted

Solution code:
n = int(input())
 
if n%2 == 0:
    print(0.5)    #整数Nが偶数のとき
else:
    s = (n-1)/2    #偶数の数を確認
    s /= n    #nで割って偶数の確率を求める
    print(1-s)    #全体から偶数の確率を引いて奇数の確率を求める

Submission status: Accepted

Solution code:
import math
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

input = stdin.readline
mi = lambda: map(int, input().split())
lmi = lambda: list(mi())
si = lambda: input().strip('\n')
ii = lambda: int(input())

n = int(input())
a = n//2
b = n-a
print("{:.6f}".format(b/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())
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(1 / 2)
else:
    print((((n - 1) / 2) + 1) / 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())
print(1-n//2/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
print('{:.8f}'.format((a+1)//2/a))

Submission status: Accepted

Solution code:
n=int(input())
count=0
for i in range(1,n+1):
    if i%2!=0:count+=1
result=count/n
print("%.10f"%result)

Submission status: Accepted

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

q, mod = divmod(N, 2)

print('{:.10g}'.format((q+mod)/N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
b = float(1.0)

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

Submission status: Accepted

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