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

c=0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N =  int(input())
if N % 2 == 0:
    ans = (N // 2) / N
else:
    ans = ((N + 1) // 2) / N
print("{:.10f}".format(ans))

Submission status: Accepted

Solution code:
n = float(input())
if n == 1:
    print(1)
    exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

input = stdin.readline


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


if __name__ == '__main__':
    p_a()

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
if n % 2 == 0:
    even = n/2
    print('{:.10f}'.format(even/n))
else:
    odd = n//2 + 1
    print('{:.10f}'.format(odd/n))

Submission status: Accepted

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

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())
import random
 
print(1-(n//2)/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
all_list = []
odd_list = []

for i  in range (1, n+1):
    if i % 2 == 0:
        all_list.append(i)
    else:
        odd_list.append(i)
        all_list.append(i)
        
print('{:.10f}'.format(len(odd_list)  / len(all_list)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=a//2
g=a%2
if g!=0:
  b=b+1
c=b/a
print(c)

Submission status: Accepted

Solution code:
x = input()
a = int(x)


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

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

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

Submission status: Accepted

Solution code:
from enum import Enum
from queue import Queue

import numpy as np

import collections
import bisect
import sys
import math

from scipy.sparse.csgraph import floyd_warshall

BIG_NUM = 200000000000
MOD = 1000000007
EPS = 0.000000001

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

Submission status: Accepted

Solution code:
n = int(input());
nn = 0;

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc142/tasks/abc142_a
import math
N = int(input())
odd = math.ceil(N/2)
print(odd/N)

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

b = list(range(1,N+1,2))

b_len = len(b)


print(len(b)/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print('{:.10f}'.format(count/n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print("%.10f" % (count/t))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
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())
Ans=float(0)
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:
    ans = 0.5
else:
    ans = (n//2+1)/n

print(ans)

Submission status: Accepted

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

import math

if N%2==0:
    print('0.5000000000')
else:
    print(math.ceil(N/2)/N)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
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 LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    n = INT()
    print(ceil(n/2)/n)

if  __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

Submission status: Accepted

Solution code:
import math
a = float(input())
result = 1 if a == 1 else math.ceil(a/2)/a
print(result)

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())
print('{:.8f}'.format((n-n//2)/n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())

if a%2==0:
  val = 0.5000000000

if a%2==1:
  val = (a+1)/2/a
print(val)

Submission status: Accepted

Solution code:
#整数で受け取る
N = int(input())

number = 0
#奇数の数を数える
for i in range(1, N+1):
    if i % 2 != 0:
        number += 1

result = number / N

print(result)

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

Submission status: Accepted

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

print(odd_num/N)

Submission status: Accepted

Solution code:
n = int(input())


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

print(ans)

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

if num % 2 == 1:
    count = num // 2 + 1
else:
    count = num // 2

odds = count/num

print(odds)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__=='__main__':
	
	odds_of_oddness()

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
print(np.ceil(N/2)/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a = sys.stdin.readline().rstrip()
a_int = int(a)

if a_int%2==0:
    print("0.5")
elif a_int == 1:
    print("1.0000000000")
else:
    b = ((a_int - 1)/2 + 1) / a_int
    print('{:.10f}'.format(b))

Submission status: Accepted

Solution code:
n1 = int(input())

n2 = n1 // 2

r1 = (n2 + (n1 - 2 * n2)) / n1 

print(r1)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

print(counter/N)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
answer = 0
O = 0

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

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Contest: AtCoder Beginner Contest 142 (https://atcoder.jp/contests/abc142)
# Problem: A: Odds of Oddness (https://atcoder.jp/contests/abc142/tasks/abc142_a)

def rint():
    return int(input())


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


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

Submission status: Accepted

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

i=0
L=[]

while 2*i+1 <= N:
    j = 2*i+1
    L.extend([j])
    i += 1
a = int(len(L))
pro = a/N
print(pro)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

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


print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

odd_cnt = 0
even = 0

for i in range(1, n+1):
  if i % 2 != 0:
    odd_cnt +=1
  else:
    even += 1

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

Submission status: Accepted

Solution code:
n = int(input())
a,b = n // 2, n % 2
print("{:.10f}".format((a + b) / n))

Submission status: Accepted

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

print(count/N)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input() )

n_odd = 0

def is_even(num):
    if num % 2 == 0:
        return 0
    else:
        return 1
for i in range(1, N+1):
    n_odd += is_even(i)

print(n_odd/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力
N=int(input())


result=(N-N//2)/N

#出力
print(result)

Submission status: Accepted

Solution code:
import math

n = int(input())
if n % 2 == 0:
    print("{:.10f}".format(0.5))
else:
    print("{:.10f}".format(math.ceil(n / 2.0) / n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
N_list = [i+1 for i in range(N)]
ans = 0
for i in range(N) :
    if N_list[i] % 2 == 1 :
        ans += 1
print(ans/N)

Submission status: Accepted

Solution code:
n=int(input())

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

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

Submission status: Accepted

Solution code:
N = input()
1 <= int(N) <= 100

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=raw_input()
n=int(N)

ai = [ i for i in range(n+1) if i%2 == 1]
print 1.0 * len(ai) / n

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc142/tasks/abc142_a
# -*- coding: utf-8 -*-

input_val = int(input())

# 奇数の数(切り上げ)
odd_cnt = -(-input_val // 2)

print(odd_cnt / input_val)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 1:
	n_odd = (N + 1) / 2
	print('{:.10f}'.format(n_odd / N))

else:
	print('{:.10f}'.format(1 / 2))

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 18,Oct,2019
"""

import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
N = int(input())

a = []

for i in range(1,N+1):
  if i % 2 != 0:
    a.append(i)
  else:
    pass

ans = len(a) / N

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
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 = count + 1

print(count/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:
    result = 0.5
else:
    result = 1 - N // 2 / N

print(result)

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
if N % 2 == 0:
    ans = (N // 2) / N
else:
    ans = (N // 2 + 1) / 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())
def odd(N):
    if(N == 1):
        return 1.0
    if(N % 2 == 0):
        return 0.5
    else:
        return ((N-1)/2+1)/N

  
print(odd(N))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_line = input()
N = int(input_line.split(' ')[0])

buff = [i for i in range(1,N+1,1)]
print('{:.10f}'.format(len(buff[::2])/len(buff)))

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
  v = 0.5
else:
  m = (n - 1) / 2
  v = (m + 1) / n
  
print("{}".format(v))

Submission status: Accepted

Solution code:
n = int(input())
a = [0]
a = [i for i in range(1,n+1)]
c = a[0::2]

print(float(len(c)/len(a)))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
answer = 0.0
odd = 0
even = 0
for i in range(1,N+1):
    if i % 2 == 0:
        even += 1
    else:
        odd += 1
answer = odd / N
print("{:.6g}".format(answer))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
try:
    n=int(input())
    even=n//2
    odd=n-even
    a=odd/n
    print('%.10f'%a)
except:
    pass

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num_odd = lambda x: x/2 if x % 2 == 0 else x/2 + 1 
 
import fileinput
for line in fileinput.input():
    try:
        N = int(line.strip())
    except:
        continue
 
    print(1.0 * num_odd(N) / N)

Submission status: Accepted

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

Submission status: Accepted

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

if n % 2 == 1:
  s = (n + 1) / 2
  ans = s / n
  print(ans)
  exit()
  
ans = float(0.5)
print(ans)

Submission status: Accepted

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


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

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

    
# main関数呼び出し
if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(N_odd/N)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ans = 0;

if n%2 :
    # 奇数のとき
    ans = 0.5 * (1 + 1/n)
else :
    # 偶数のとき
    ans = 0.5

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from fractions import gcd
from itertools import groupby as gb
from itertools import permutations as perm
from itertools import combinations as comb
from collections import Counter as C
from collections import defaultdict as dd
sys.setrecursionlimit(10**5)
def y(f):
    if f:
        print('Yes')
    else:
        print('No')
def Y(f):
    if f:
        print('YES')
    else:
        print('NO')

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

Submission status: Accepted

Solution code:
import random

N = input()
N = float(N)
w = N / 2
s = N % 2
ans = (int(w)+s) / N
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
num = int(input())
if num % 2 == 0:
    print("{0:6f}".format((num / 2)/num))
else:
    print("{0:6f}".format((int(num / 2) + 1)/num))

Submission status: Accepted

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

Submission status: Accepted

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