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("%.7lf" % 0.5)
else:
    print("%.7lf" % ((n // 2 + 1) / n))

Submission status: Accepted

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

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

odd=[]
for i in range(1,n+1):
  if i%2==1:
    odd.append(i)
print(len(odd)/n)

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

n = onem()


k = 0
kk = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
odds = range(1,N+1,2)
print(len(odds)/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

N = int(input()) # integer

o = N//2

ans = float(N-o)/N

print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
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())
odd=int(N/2)
print((N-odd)/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

x = N % 2

if x == 0:
    print(1/2)
else:
    y = N // 2 + 1
    print(y / N)

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
print(len([x for x in range(1, N+1) if x%2 == 1])/N)

Submission status: Accepted

Solution code:
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''
#codeforces
gi = lambda : list(map(int,input().split()))
n, = gi()
print(((n + n % 2) // 2) / n)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#ABC142A
import sys
#sys.setrecursionlimit(100000)

n=int(input())
#tmp = input().split()
#h,w,a,b = list(map(lambda a: int(a), tmp))


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

Submission status: Accepted

Solution code:
N = int(input())

count_1 = N//2 + N%2

print(count_1/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input = raw_input


n = int(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	NN = inputInt()

	ki = 0
	gu = 0
	for i in range(1, NN+1):
		if i % 2 == 1:
			ki += 1
		else:
			gu += 1

	print(ki / NN)


if __name__ == "__main__":
	main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq

mod = 1e9+7

def swap(a,b):
    return (b,a)

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

def divisors(a):
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

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

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:
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    n = II()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
t=1
for tt in range(t):
    n=int(input())
    e=n//2
    o=n-e
    print(o/(n))  
    #n,k,s= map(int, sys.stdin.readline().split(' '))
    #a=list(map(int,sys.stdin.readline().split(' ')))
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

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

Submission status: Accepted

Solution code:
N = int(input())
bunshi = N // 2

if N % 2 != 0:
    bunshi += 1

print(bunshi/N)

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 collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline-------------------------------------------
    N = int(input())
    print(1/2 if N%2 == 0 else (N+1)/(2*N))
if __name__ == "__main__":
    main() #endline===============================================

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

import sys
# input = sys.stdin.readline
sys.setrecursionlimit(100000)
MOD = 10 ** 9 + 7

#N = int(input())
#A = [int(x) for x in input().split()]
#V = [[0] * 100 for _ in range(100)]

N = int(input())

gu = N // 2
print((N-gu)/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())
print(int(N / 2 + 0.5) / N)

Submission status: Accepted

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

n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    N = int(input())
    res = (N-N//2)/N

    return str(res)

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

Submission status: Accepted

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

Submission status: Accepted

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

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("{}".format(((N//2)+1)/N))

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

print(c/n)

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N = int(input())
    a = N // 2
    print((N - a) / N)

    

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

N = INT()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
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())
print(-(-n//2) / n)

Submission status: Accepted

Solution code:
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    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))


if __name__ == '__main__':
    main()

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:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()

print(ceil(N, 2)/N)

Submission status: Accepted

Solution code:
import sys
import os
import math

N  = int(input())
if N%2==0:
    print((N/2)/N)
else:
    print(math.ceil(N/2)/N)

Submission status: Accepted

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

length = len(N)
odds = []

for i in N:
    if i % 2 == 1:
        odds.append(i)

print(len(odds)/length)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def main():
    input = sys.stdin.readline
    N = int(input())
    if N % 2 == 0:
        ans = (N / 2) / N
    else:
        ans = (((N-1) / 2)+1) / N
    print(ans)
if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

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

N=one_int()

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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 read():
    return int(input())

def readmap():
    return map(int, input().split)

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


if __name__ == "__main__":
    N = read()

    odds = (N + 1) // 2

    print(odds / N)

Submission status: Accepted

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

Submission status: Accepted

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

if N == 1:
    ans = 1
else:
    ans = math.ceil(N/2) / N

print(ans)

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

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

    print(ans/float(N))

    # for i in range(N):
    #     A = list(map(int, input().split()))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
print("{:.14f}".format(1-n//2/n))

Submission status: Accepted

Solution code:
def main():
    # a = [int(a) for a in input().split()]
    # print(234)
    a = int(input())

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


if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

N = int(input())
ans = 0
if N == 1:
    ans = 1
elif 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 sys

def main():
    input = sys.stdin.readline
    N = int(input())
    e, o = 0, 0
    for i in range(1, N+1):
        if i % 2 == 0:
            e += 1
        else:
            o += 1

    return (o) / (e + o)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:

N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(p)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())

A = (N + 1) // 2

Ans = A / 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())

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

print(odd / N)

Submission status: Accepted

Solution code:
n = int(input())
odd = 0
for i in range(n):
    a = i + 1
    if a % 2 == 1:
        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())
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())

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())
odds = list(range(1,N+1))[0::2]
print(len(odds)/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(s)

Submission status: Accepted

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

N = int(input())

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:
#!/usr/bin/env python3
n = int(input())
even = n // 2
odd = n - even
print(odd / n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

cnt = 0

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

print(cnt/n)

Submission status: Accepted

Solution code:
n = int(input())

k = n // 2
if n % 2 == 1:
    k = k + 1

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from bisect import *
from collections import *
from heapq import *
import itertools
INF = 10**9
MOD = 10**9+7

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//2)+1)/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:
import sys
input = sys.stdin.readline
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)
elif n==1:
    print(1.0)
else:
    print((n//2+1)/n)

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())

gusu = N // 2

ans = (N-gusu)/N
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
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:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
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())
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())
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((n//2)/n)
else:
    print((n//2+1)/n)

Submission status: Accepted

Solution code:
import math
import heapq
from bisect import bisect_right, bisect_left
from collections import defaultdict, Counter
import itertools
import sys
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7
INF = float("inf")


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

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

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)