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

Submission status: Accepted

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

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:
#!/usr/bin/env python3
import math
N = int(input())
# S = input()
# A, B = map(int, input().split())
# A = list(map(int, input().split()))
print(math.ceil(N / 2) / N)

Submission status: Accepted

Solution code:
n=int(input())
if n%2==0:
    print(0.5)
else:
    print(((n-1)/2+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())
if N % 2 == 0:
    print('{:.010f}'.format(1 / 2))
else:
    print('{:.010f}'.format((N+1) / (2 * 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())
print(N/2/N if N%2==0 else (N+1)/2/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

ans = odd / n
print(ans)

Submission status: Accepted

Solution code:
N=int(input())

alls = range(1,N+1)

odds= [n for n in alls if n%2== 1] 

print(len(odds)/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans/N)

Submission status: Accepted

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

cnt = 0

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

print(float(cnt/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())
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:
    k = N//2
    print((k+1)/N)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 0

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

print(ans/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a,b=divmod(n,2)
print((a+b)/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())
odd_num=-(-n//2)
print(float(odd_num/n))

Submission status: Accepted

Solution code:

n=int(input())
odd_num=-(-n//2)
print(float(odd_num/n))

Submission status: Accepted

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

def main():
    N = int(input())
    o = -(-N//2)
    print("{0:.10f}".format(o/N))

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
sum = 0
for i in range(n+1):
  if(i % 2 == 1):
    sum+= 1
print('{:,}'.format((float)(sum/n)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

even = N // 2
odd = N - even
if N % 2 == 0:
    ans = odd / N
else:
    ans = odd / N
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

print(((N // 2) + int(N % 2 != 0)) / N)

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

# import sys
# input = sys.stdin.readline
# 
# sys.setrecursionlimit(10 ** 7)
# 
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
a = int(sys.stdin.readline().rstrip())
b = math.ceil(a / 2)
print(b / a)

Submission status: Accepted

Solution code:
x=float(input())
c=0
for i in range(1,int(x+1)):
    if (i%2!=0):
        c+=1
print('%.10f'%(c/x))

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

Submission status: Accepted

Solution code:
N = int(input().strip('\n'))
print(1-N//2/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
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:
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n = int(readline())
odd = 0
for i in range(1,n+1):
    if not even(i):odd+= 1

print(odd/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right

# https://atcoder.jp/contests/abc142/tasks/abc142_a
N = read_a_int()

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

Submission status: Accepted

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

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:
from math import pi, ceil, floor
import sys
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def resolve():
    import math
    n = int(input())
    print(int(math.ceil(n/2))/n)
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tup(t=int):return tuple(pin(t))
#%%code
def resolve():
    N=int(input())
    if N%2==0:
        print(0.5)
    else:
        t=(N+1)//2
        print(t/N)
#%%submit!
resolve()

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from heapq import heapify, heappop, heappush
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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



if __name__ == '__main__':
    solve()

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 examA():
    N = I()
    ans = ((N+1)//2)/N
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(readline())
def LI(): return list(map(int,readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l =[i for i in range(1, n+1)]
odds = [i for i in range(1, n+1) if i % 2 == 1]
print(float(len(odds))/float(len(l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

a = [x for x in range(1, N+1, 2)]
print(len(a)/N)

Submission status: Accepted

Solution code:
import os

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


if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
lst = []

for n in range(1, N+1):
    if n%2 == 0:
        pass
    else:
        lst.append(1)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import factorial as fact
import math
import fractions
import sys
import itertools
import numpy as np
from collections import Counter
import datetime
#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(n,r))

def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets


def CountOneRoots(x,y):
	#x:縦，y:横
	return fact(x+y)/fact(x)/fact(y)



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

Submission status: Accepted

Solution code:


n = int(input())

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())

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

     
print(a/K)

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 0:
    print(format(n/(2*n), '.10f'))
    #print(n/(2*n))
else:
    print(format((n+1)/(2*n), '.10f'))
    #print((n+1)/(2*n))

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 0:
    #print(format(n/(2*n), '.10f'))
    print(n/(2*n))
else:
    #print(format((n+1)/(2*n), '.10f'))
    print((n+1)/(2*n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import bisect_right as bsr
from collections import Counter as cnt
from collections import defaultdict as dd
from collections import deque
from fractions import gcd
from itertools import combinations as comb
from itertools import permutations as perm
from math import ceil, factorial, floor
from operator import itemgetter as ig

sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    N = input(int)
    print(ceil(N / 2) / N)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

Solution code:
#Coding:Utf-8
N=int(input())
if N%2==0:
    print('{:.10f}'.format(N/2/N))
elif N%2==1:
    print('{:.10f}'.format((int(N/2)+1)/N))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
count = 1

if n == 1:
    print(1.0000000000)
elif n == 0:
    print(0.0000000000)
elif n % 2 == 0:
    print(0.5000000000)
else:
    for i in range(1, n):
        if i % 2 == 1:
            count+=1
    print(count/n)

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n = input()
n = int(n)
ans = 0.0

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

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:
import itertools
##print(ord("A"))
n = int(input())
ans = 0
for i in range(1,n+1):
    #print(i)
    if i%2!=0:
        ans+=1
print(ans/n)

Submission status: Accepted

Solution code:
#--Odds of Oddness
import math

N = int(input())
harf = math.floor(N/2)

if(N % 2 == 0):
  print('{:.10f}'.format(harf/(2*harf)))
elif(N % 2 == 1):
  print('{:.10f}'.format((harf+1)/(2*harf+1)))

Submission status: Accepted

Solution code:
a = int(input())

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

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:
import math
n = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n = input()
n = int(n)
count = 0

for i in range(n):
    i = i + 1
    if i % 2 != 0:
       count = count + 1
answer = (count / n)
print(format(answer, '.10f'))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
print( -(-N//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(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(1-(n//2)/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

import sys
# import math
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference


def main():
    mod = 1000000007                  # 10^9+7
    inf = float('inf')
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    n = ii()
    print(0.5) if n % 2 == 0 else print(((n+1)//2) / n)

if __name__ == "__main__":
    main()

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

Submission status: Accepted

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


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

#
kisu_num =(N+1)//2
print(kisu_num/N)

Submission status: Accepted

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

Submission status: Accepted

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

print("{0:.10f}".format(count/N))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    nums = [i for i in range(1, n+1)]
    print( ((len(nums) + 1) // 2) / len(nums) )

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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