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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())

print((a - a//2) / a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:

def q1():
    N = int(input())
    d,m = divmod(N,2)
    print('{0:.6f}'.format((d+m)/N))


if __name__ == '__main__':
    q1()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Odds of Oddness
https://atcoder.jp/contests/abc142/tasks/abc142_a

"""
import sys


def solve(N):
    odds = sum(1 for n in range(1, N+1) if n % 2)
    return odds / N


def main(args):
    N = int(input())
    ans = solve(N)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

print((N-N//2)/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:
import math
n = int(input())

odd = math.ceil(n / 2)

print('%1.10f' % (odd / n))

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 = int(input())
print(sum(i % 2 == 1 for i in range(1, n+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:
  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())

odds = N // 2 + N % 2
p = odds / N

print('{:.10f}'.format(p))

Submission status: Accepted

Solution code:
import math

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(map(str, input().split()))
def pl(a): print(" ".join(list(map(str, a))))
def ma():return map(int,input().split())
def nli(x):return [input for _ in range(x)]
def hukusuu(): 
  listA=[] #appendのために宣言が必要
  while True:
    try:listA.append(list(map(int,input().split())))
    except:break #または、quit(),os.exit()をして止める。
  return listA

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
import math
if n % 2 == 0:
    print(1/2)
else:
    i = math.ceil(n/2)
    print(i/n)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(odd/n)

Submission status: Accepted

Solution code:
n = int(input())
r, q = divmod(n, 2)
print((r + q) / 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())
print('{:.10f}'.format((-(-N//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+1)//2/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

num_of_odd = int(N / 2 + 0.5)

answer = num_of_odd / N

print(answer)

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from itertools import *
from collections import *

INF = float('inf')


def main():
    N = int(input())
    total_odd = 0
    for i in range(1, N + 1):
        if not i % 2 == 0:
            total_odd += 1
    print(total_odd / 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 + 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:
S = int(input())
if S % 2 == 1:
    ans = float((S//2)+1)/float(S)
    print(ans)
else:
    ans = float(S//2)/float(S)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

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

Submission status: Accepted

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

print(ans/N)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 142: A – Odds of Oddness
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 == 1:
    ans = 1
elif n % 2 == 0:
    ans = n // 2 / n
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:
    print((N-((N/2)-0.5))/N)

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  n = int(read())
  print(((n+1)//2)/n)
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
import fractions
def main():
  n = int(input())
  prob = ((n + 1)//2)/n
  print(prob)
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n = int(sys.stdin.readline().rstrip())

def main():
    a = (n + 1) // 2
    ans = a / n
    print(ans)

if __name__ ==  '__main__':
    main()

Submission status: Accepted

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

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('{:.6f}'.format(0.5))
else:
    print('{:.6f}'.format((N//2+1)/N))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())

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

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:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
n=ii()

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

print(0.5) if not N % 2 else print((N // 2 + 1) / N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
odd = (N+1) // 2
even = N // 2
print(odd / (odd+even))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N= int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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((N//2)/N)
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:
import math 
N  = int(input())
print(math.ceil(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&1:
  print(((n+1)//2)/n)
else:
  print(1/2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n=int(input())

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

Submission status: Accepted

Solution code:
import decimal
N = int(input())
if N % 2 == 0:
  print('0.5')
else:
  A = decimal.Decimal((N-(N//2))/N)
  print(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())
o = n // 2
print((n-o)/n)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

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

print(c/n)

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n = float(input())

if n % 2 == 0:
    print('{:.10f}'.format(n//2/n))
elif n % 2 == 1:
    print('{:.10f}'.format((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:
#142_A
n = int(input())
print(0.5 if n % 2 == 0 else (n + 1) / (2 * n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

print((a//2+a%2)/a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
num = int(input())
#奇数である確率
a,b = divmod(num,2)
if b != 0:
  a = a + 1
print(a / num)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import math
N = int(input())

if N%2==1:
    a = math.ceil(N/2)/N
else:
    a=0.5
print("{:.10f}".format(a))

Submission status: Accepted

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

Submission status: Accepted

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

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())

# nが偶数のとき
if n%2 == 0:
    print(0.5)

# nが奇数のとき
else:
    m = (n//2 + 1)/n
    print(m)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

N = int(input())
# print(N)

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

Submission status: Accepted

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

print(p)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


n = int(input().rstrip())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# Problem A - Odds of Oddness

# input process
N = int(input())

# initialization
count = 0

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

print(count/N)

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    if N % 2 == 0:
        return 0.5
    return ((N+1) // 2) / N

print(solve())

Submission status: Accepted

Solution code:

N = int(input())

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

print(count/N)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

ans = up / down
print(ans)

Submission status: Accepted

Solution code:
# import math
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque
# from collections import Counter

import numpy as np
# import scipy as scp

# 入力の受け取り
n = int(input())

if n%2 == 0:
    ans = 0.5
elif n==1:
    ans = 1.0
else:
    ans = (n+1)/(2*n)

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

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:
import sys
from bisect import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

N = int(input())
odd, even = 0, 0
for i in range(1, N + 1):
    if i % 2 == 0:
        even += 1
    else:
        odd += 1
print('{:.8f}'.format(odd / (even + odd)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N= int(input())

q,mod = divmod(N,2)

if mod==1:
    Nodd=q+1
else:
    Nodd=q

print(Nodd/N)

Submission status: Accepted

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

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:
a = int(input())
if a % 2 == 0:
		print(0.5)

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

Submission status: Accepted

Solution code:
n=int(input())
list=[]

for i in range(1,n+1):
    list.append(i)

answer=[]
answer=[i for i in list if i%2!=0]
ans=len(answer)/n
print("%012.10f" %ans)

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

    if(N > 1):
        if(N % 2 == 0):
            odd_cnt = N // 2
        if(N % 2 == 1):
            odd_cnt = N // 2 + 1

        print(odd_cnt / N)
    else:
        print(N)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Odds of Oddness
n=int(input())
odd=0
for i in range(n+1):
    if i%2!=0:
        odd+=1

print(odd/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

odd, eve = 0, 0

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

print(odd/n)

Submission status: Accepted

Solution code:
n = int(input())

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