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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import sys

def input():
    return sys.stdin.readline()[:-1]

N = int(input())

odd = math.ceil(N / 2)

print(odd / N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
i = 1
list = []
while(i <= n):
    if (i % 2 == 1):
        list.append(i)
    i += 1
print(len(list) / n)

Submission status: Accepted

Solution code:
#import math
#import bisect
#import numpy as np
#import itertools
#import copy
import sys

input = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

if num%2 == 0:
  print(1/2)
elif num%2 == 1:
  numerator = (num+1)/2
  print(numerator/num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

s = 0
for i in range(1, n+1):
  if i % 2 != 0:
    s += 1
print(s/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.50000000)
else:
    print(((n//2)+1)/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


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

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

    return 0


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
# coding: utf-8

total = int(input())
odds = []
for i in range(1,total+1):
    if i % 2 == 0:
	    pass
    else:
        odds.append(i)
print(len(odds) / total)

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans / N)

Submission status: Accepted

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

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

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#python3
from math import ceil
def main():
    n = int(input())
    a = ceil(n/2)
    print("{0:.10f}".format(a/n))
main()

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())

l = np.arange(1,N+1)

print(np.sum(l%2==1)/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import math

N = float(input())

p = math.ceil(N/2)/N

print(p)

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 = float(input())

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

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

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

Submission status: Accepted

Solution code:
n = int(input())

print(len(list(filter(lambda i: i % 2 == 1, range(1, n + 1)))) / n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
a = int(input())
M = []
for i in range(a):
    if i % 2 ==0:
        M.append(i)
b = len(M)
print(b/a)

Submission status: Accepted

Solution code:

def resolve():
    n = int(input())
    res = ((n+1) // 2) / n
    print(res)
    
resolve()

Submission status: Accepted

Solution code:
from fractions import Fraction as f
n = int(input())
odd = 0
for i in range(1,n+1):
  if i % 2 != 0:
    odd += 1
print(float(f(odd,n)))

Submission status: Accepted

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

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:
    n = N // 2
else:
    n = N // 2 + 1

print (n / N)

Submission status: Accepted

Solution code:
N = int(input())
div, mod = divmod(N, 2)
if mod != 0:
    div += 1
oddness = div / N
print(oddness)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc142/tasks/abc142_a

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

Submission status: Accepted

Solution code:
n = int(input())

oddcount = 0

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(count/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0:
    print(0.5)
else:
    print('{:.7g}'.format((N+1)/(2*N)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

print(odd/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
import math
print(math.ceil(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(cnt / N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 0:
  print(0.5)
else:
  # mは奇数の個数
  m = n // 2 + 1
  print(m/n)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
if n % 2==0:
    x = [int(i) for i in range(n-1,0,-2)]
else:
    x = [int(i) for i in range(n,0,-2)]
print(len(x)/n)

Submission status: Accepted

Solution code:
n = int(input())

odds = int((n+1) / 2)

print(odds/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

odds = [n for n in range(1, N+1) if n%2==1]

print(len(odds)/N)

Submission status: Accepted

Solution code:
import numpy as np
from sys import stdin
from copy import deepcopy
from functools import reduce
from fractions import gcd
import math
import itertools
from collections import Counter
from itertools import chain  ##list(chain.from_iterable(l)) ##flatten
from heapq import heappush, heappop


N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

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

main()

Submission status: Accepted

Solution code:
a = int(input())
b = []
c = a
for i in range(a):
    if c % 2 != 0:
        b.append(c)
    c = c - 1
print(len(b) / a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if N==1:
  print(1.0000000000)

elif N%2==0:
  print(0.5000000000)

else:
  m=l[0::2]
  #奇数の個数
  print(len(m)/N)

Submission status: Accepted

Solution code:
a=int(input())

odd = 0

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

print('{:.10f}'.format(odd/a))

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:
    print(0.5)
else:
    print((n//2+1)/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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor
from itertools import accumulate, permutations, combinations, product
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

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

Submission status: Accepted

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

Submission status: Accepted

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


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


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

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

Submission status: Accepted

Solution code:
n=int(input())

s=0
s_odd=0

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

print(s_odd/s)

Submission status: Accepted

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

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 != 0:
        ans += 1

print(ans/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = input()

oddnum = list(range(1, int(N)+1, 2))
print(len(oddnum)/int(N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = float(input())

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

print("{0:.10f}".format(b))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n=int(input())

if n%2==0:
    print("{:.10f}".format(0.5))
else:
    print("{:.10f}".format((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())
t = 0
for i in range(N):
  if i%2 == 0:
    t += 1
print(t/N)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

def read_int(row):
    return int(row().rstrip())

S = read_int(row)
print((S - S//2)/S)

Submission status: Accepted

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

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:
def solve(inp):
    N = int(inp.readline().strip())

    return str((int(N / 2) + (N % 2)) / N)


def test(s):
    from io import StringIO
    print(solve(StringIO(s)))


def main():
    import sys
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    # test('50\n' + '100 ' * 50)
    main()

Submission status: Accepted

Solution code:
import math 

N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
listx = []
for i in range(1, N+1):
    listx.append(i)

countodd = 0

for j in range(len(listx)):
    if listx[j] % 2 != 0:
        countodd += 1
print(countodd / len(listx))

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,M = map(int,input().split())
N = int(input())

cnt_odd = 0
cnt_even = 0

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

ans = cnt_odd / (N)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = input()
j = int(n.strip())
p = j / 2
x = math.ceil(p)
print(x/j)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math

a = int(input())
b = math.ceil(a/2)
p = b/a
print(p)

Submission status: Accepted

Solution code:
n = int(input())

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

print(float(x))

Submission status: Accepted

Solution code:
import sys

#print("Please enter a value of N")
n = int(input())
if isinstance(n,int) == False:
    print("Input value is not a type of int.")
    sys.exit()
elif n < 1 or 100 < n:
    print("Input value is not in this range [0,100].")
    sys.exit()
else:
    if n%2 == 0:
        a = float(1/2)
    else:
        a = float(((n+1)/2)/n)
    
    print(a)

Submission status: Accepted

Solution code:
n=int(input())
if n%2==1:
    #a = ("%.10f" % ((n//2+1)/n))
    a=float((int(n / 2) + 1) / n)
else:
    a=float((int(n/2))/n)

print(a)

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:

N=int(input())

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

Submission status: Accepted

Solution code:

N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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 fractions import gcd
 
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(0.5)
if n % 2 != 0:
  a = n // 2
  b = n // 2 + 1
  print(b / n)

Submission status: Accepted

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

Submission status: Accepted

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

print(c/N)

Submission status: Accepted

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

per = float(count / N)

print(per)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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:
n = int(input())
print(float(sum([1 if i%2==1 else 0 for i in range(1, n+1)]))/float(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())

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

Submission status: Accepted

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

Submission status: Accepted

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