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: Wrong Answer

Solution code:
n = int(input())
# n, m = map(int, input().split())
# s = input()
# a = list(map(int, input().split()))

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N == 1:
    print(1)
elif N % 2 == 0:
    print(0.5000000000)
elif N % 2 == 1:
    print(0.6000000000)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: UTF-8
N = int(input())
ans = (N // 2) / N
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

a = 0.0
if N == 1:
    a = 1
elif N % 2 == 1:
    a = 0.6
else:
    a = 0.5

print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
# n, m = map(int, input().split())
# s = input()
# a = list(map(int, input().split()))

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

Submission status: Wrong Answer

Solution code:
A=int(input())
cnt=0

for i in range(1,A+1):
  if i%2==1:
    cnt+=1
    
print(cnt/100)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if N == 1:
    print(N)
elif mod == 0:
    print(0.500000)
elif mod == 1:
    print((float(N-2)/float(N)))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N ==1:
  print(0)
  exit()

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

print(kisuu / N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
print(1 if n==1 else math.floor(n/2))

Submission status: Wrong Answer

Solution code:
a=int(input())
s=round(a/2)
ans=s/a
print(ans)

Submission status: Wrong Answer

Solution code:
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)

print(odd/n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if(N == 1):
    print(1.0)
    exit()
lst = [i for i in range(N)]

i = lst[1::2]

print(len(i)/N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N == 1:
    print(1)
    exit()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=int(input())

no=x//2
if(x%2==1):
    no+=1
print(no)
print(x)
print(no/x)

Submission status: Wrong Answer

Solution code:
print(0.5+int(input())%2/10)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())

print(((a+1)/2)/a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
# n, m = map(int, input().split())
# s = input()
# a = list(map(int, input().split()))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

print(n/2,n%2)

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n == 1:
  print(1.0)
  exit()
if n%2 == 0:
  print(1/2)
else:
  print(3/5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n == 1:
    print(1)
elif n % 2 == 0:
    print(0.6)
else:
    print(0.500000)

Submission status: Wrong Answer

Solution code:
N = int(input())

mynum = 0

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

print(mynum/N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(float(float(input())/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

print((int(round(n/2, 0)) + 1)/n)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(1 - kisuu/n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
ｎ = int(input())
if n == 1:
    print(1)
    exit()
if n % 2 == 0:
    print(0.5)
else:
    print(0.6)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
k = n//2

print(k/n)

Submission status: Wrong Answer

Solution code:
from sys import stdin

N = int(stdin.readline().rstrip())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n == 1:
    print(1.0000000000)
elif n%2 == 0:
    print(0.5000000000)
else:
    print(0.6000000000)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

print(1/n)

Submission status: Wrong Answer

Solution code:
s = int(input())
if s == 1:
    print(1)
elif s % 2 == 0:
    print(0.5)
else:
    print(0.600000)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

print((n//2)/n)

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N = int(input())
trial = 10**8
arr = np.random.randint(1,N+1,trial)
x = np.count_nonzero(arr&1)
print(x/trial)

Submission status: Accepted

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

Submission status: Accepted

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

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

a = a + 1
print('{:.08f}'.format(a / n))

Submission status: Accepted

Solution code:
N = int(input())


if N == 1:
    print(1.0)
elif N % 2 == 0:
    print(0.5)
    exit()
elif N % 2 != 0:
    print((N - (N // 2)) / N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

m=n//2
l=n-m
answer=l/n

if n==1:
  print(1)
else:
  print(answer)

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

Submission status: Accepted

Solution code:
N = int(input())
# 偶数の個数を数える
numEven = N // 2
print(1.0 - numEven / N)

Submission status: Accepted

Solution code:
import math

n=int(input())

print((n-math.floor(n/2))/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

print(1-(n//2)/n if not n%2==0 else 0.5000000000)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#142-A

N = int(input())

D = []

for i in range(1,N+1):
    D.append(i)

#print(D)

cnt = 0

for j in D:
    if j % 2 != 0:
        cnt += 1


#print(cnt)
print(cnt / len(D))

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

ANS = (N - g) / N

print(ANS)

Submission status: Accepted

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

Submission status: Accepted

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

n=int(input())

if n%2==0:
    a=n/2
else:
    a=n//2+1

print(a/n)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

# N=2n => p=1/2
# N=2n-1 => p=n/N=(N+1)/(2N)
print((N-N//2)/N)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools as fts
import itertools as its
import math
import sys

INF = float('inf')


def solve(N: int):
    return (N//2 + N % 2) / N


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    print(f'{solve(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())
if(n%2==0):
  print((n//2)/n)
else:
  print((n//2+1)/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

num_even = N//2
num_odd = N - num_even

print(num_odd/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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


def main():
    N = int(readline())

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

    print(odd / N)


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# 問題：https://atcoder.jp/contests/abc142/tasks/abc142_a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

    print(f"{ans:.10f}")


if __name__ == "__main__":
    main()

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:
def readinput():
    n=int(input())
    return n

def main(n):
    if n%2==0:
        return 0.5
    else:
        return (n//2+1)/n


if __name__=='__main__':
    n=readinput()
    ans=main(n)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

l=[x for x in range(1,n+1)]

p=0

for ll in l:
  if ll%2!=0:
    p+=1

print(p/len(l))

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

ans=0

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

print(ans/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

N = int(input())

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

Submission status: Accepted

Solution code:
# A Odds of Oddness
n = int(input())
c = []
for i in range(1,n+1):
    if i % 2:
        c.append(i)
x = len(c)/n
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
# mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

n = inp()
print(math.ceil(n / 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:
a = int(input())
if a%2 == 0:
  print(0.5)
else:
  d = (a+1)/2
  print(d/a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

cnt = 0
for n in N:
    cnt += n%2!=0
    
print(cnt/len(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())
print( (n-n//2)/n )

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
mol = math.ceil(N/2) if N % 2 != 0 else N//2
print(mol/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

even = N // 2
odd = N - even

print(odd/N)