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: Runtime Error

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

Submission status: Runtime Error

Solution code:
input random for random
n = int(input())
x = randint(1,n)
if n % 2 ==0:
  print(0.5)
else:
  count = (1+n)*n*0.5
  counts = count//2
  print(counts/count)

Submission status: Runtime Error

Solution code:
a,b=input().split()
c=input().split()
ct=0
for i in c:
  if i>=b: ct+=1
print(ct)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print a

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = map(int, input())

probability = 0.0
if a%2 == 0:
	probability = 0.5
else:
	probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)

Submission status: Runtime Error

Solution code:
x=int(input())
y=x//2
z=x-1
print(z/y)

Submission status: Runtime Error

Solution code:
n = input()

a = int(n / 2)
b = n % 2

c = a + b

print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = map(int, input())

probability = 0.0
if a%2 == 0:
  probability = 0.5
else:
  probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = map(int, input())

probability = 0
if a%2 == 0:
  probability = 0 
else:
  probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())

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

else:
  print((n+1)/(2*n))

Submission status: Runtime Error

Solution code:
n = int(input())

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

elif n==1:
    print(1)

else:
    print((math.ceil(n//2)+1)/n)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
  n = input()
  if n % 2 == 0:
    print(0.5)
  else:
    p = (n+1)/(2*n)
    print(p)

Submission status: Runtime Error

Solution code:
N = int(input())

import numpy as np

nums_list = np.arange(1,N)
odd_list = nums_list[nums_list%2==1]

print(len(odd_list)/len(nums_list))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()

a = n / 2
b = n % 2

c = a + b

print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = unt(input())
print((n//2)//n)

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

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

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

print(count/N)

Submission status: Runtime Error

Solution code:
a = int(input())

if a%2 ==0 :
  print("0.5000000000") 
else  :
  temp = n//2 +1 
  temp = temp/n 
  print(temp)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : map(int, stdin.readline().split())

def main():
  n = ni()

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

main()

Submission status: Runtime Error

Solution code:
N=input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

Solution code:
n = gets.to_i
p 1.0*(n-n/2)/n

Submission status: Runtime Error

Solution code:
N=input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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