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:
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
from itertools import combinations
import bisect
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a=ii()
if a%2==0:
  print(1/2)
else:
  print(math.ceil(a/2)/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())
if N/2 == N//2:
        print(0.5)
else:
        print((N//2 + 1)/N)

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N=  int(input())
    ans = (N+1)//2/N
    print(ans)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
if n%2==0:
    print("0.5000000000")

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

print(float((N // 2) + N % 2) / N)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# A

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
if a % 2 == 0 :
  print((a - a / 2 ) / a)
else:
  print((a - a // 2) / a)
# 5 ,4 ,3 ,2 ,1
# 3 /5

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

num_odd = int(N/2+0.5)
print(num_odd/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//2+1)/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math


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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

O = [i for i in range(1, N+1) if i % 2 == 1]

print(len(O) / N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = 0
for i in range(n):
    if i%2 == 0:
        a +=1
print(a/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('{:.10f}'.format(cnt/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:
import sys

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


def solve():
    N = int(input())
    if N % 2 == 0:
        ans = 0.5
    else:
        ans = (N // 2 + 1) / N

    print(ans)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import math

n = int(input())

answer = (n - math.floor(n / 2)) / n

print(answer)

# nums = list(range(1, n + 1))
# 
# odds = [x for x in nums if x % 2 == 1]
# 
# if len(nums) % 2 == 0:
#     print(0.5)
# else:
#     print(len(odds) / len(nums))

Submission status: Accepted

Solution code:
n = int(input())

nums = list(range(1, n+1))

odds = [x for x in nums if x % 2 == 1]


if len(nums) % 2 == 0:
	print(0.5)
else:
  	print(len(odds) / len(nums))

Submission status: Accepted

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

for i in range(1,N+1):
    if i % 2 != 0:
        count += 1
print("{:.10f}".format(count / N))

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0:
    o = n//2

else:
    o = (n+1)// 2
print(o / n)

Submission status: Accepted

Solution code:
s=0
t=0
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())
odds_size = -(-N//2)
print(odds_size/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:
import os, sys, re, math

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#!/usr/bin/env python3
N = int(input())
print(0.5 if N % 2 == 0 else ((N//2)+1) / N)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import decimal # 10進法に変換，正確な計算

def input():
    return sys.stdin.readline().strip()

def main():
    n = int(input())
    n = decimal.Decimal(n)
    if n % 2 == 0:
        print(1/decimal.Decimal(2))
        return
    
    print(((n-1)/2+1)/n)

    
    
main()

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

Submission status: Accepted

Solution code:
import math

n = int(input())


ans = math.ceil(n / 2)


print(ans / 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())

import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

if n == 1:
  print(1)
elif n % 2 == 0:
  print(0.5)
else:
  import math
  print(math.ceil(n/2)/n)

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
print((n - n//2)/n)

Submission status: Accepted

Solution code:
def main():
  num = int(input())
  print(1-((int(num/2)/num)))
main()

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:
    p = ((N//2)+1) / N
else:
    p = (N//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:
# coding: utf-8
n = int(input())
if n % 2 == 0:
    print("0.5000000000")
else:
    print((n + 1) / 2 / n)

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

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

Submission status: Accepted

Solution code:
n = int(input())

lis =[]
for i in range(1,n+1):
    lis.append(i)
    
odd =[]
for j in lis:
    if j % 2 != 0:
        odd.append(j)
        
print(len(odd)/len(lis))

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    if n % 2 == 0:
        print(1 / 2)
    else:
        print((n // 2 + 1) / n)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math
import itertools
n = int(input())
 
if(n %2 == 1):
    d = int((n-1)/2) + 1
else:
    d = int(n/2)
 
ans = d/n
 
print('{:.08f}'.format(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    N = int(readline())
    print(math.ceil(N / 2) / N)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

sys.setrecursionlimit(10000000)
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue

# import fractions

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    n = N//2
    print((N-n)/ N)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
def odds_of_oddness(n):

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

else:
  print(1/2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print("{:.10f}".format(count/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((N / 2) / (N))

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

odd = (n + 1) // 2
ans = odd / n
print('{:.9f}'.format(ans))

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:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()

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

num = (N+1)//2

print(num/N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
g = n // 2
print((n-g) / 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:
def main():
    n = int(input())
    a = [0,0]
    for i in range(1, n+1):
        a[0] += 1
        a[1] = a[1] + 1 if i % 2 != 0 else a[1]
    print(a[1] / a[0])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
result = [n for n in range(N) if n % 2 == 0]
print(len(result) / N)

Submission status: Accepted

Solution code:
N = int(input())
# A = [int(_) for _ in input().split()]
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:
#!/usr/bin/env python3

n = int(input())

sup = n % 2
odd_num = n//2+sup
even_num = n//2

print(odd_num/(even_num+odd_num))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
ans=0
i=1
while i<=N:
    if i%2!=0:
        ans+=1
    i+=1

print(ans/N)

Submission status: Accepted

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

print(ans/n)

Submission status: Accepted

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

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

a=n//2+n%2

print(a/n)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

b = range(1, n)

a = b[::2]
print(1 - (len(a) / n))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect


def main():
    n = int(input())
    ans = ((n+1)//2) / n
    print('%.10f' % ans)



if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    n = I()
    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())
if n%2==0:
  print(0.5)
else:
  print((int(n/2)+1)/n)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
# A,B,C = map(int, input().split())
N = int(input())
# s = int(input())
# C = int(input())
# s= input()
print((N/2)/N if N%2 == 0 else (N//2+1)/N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import sys
# sys.setrecursionlimit
# getarr = lambda _f: list(map(_f, input().split()))

n = int(input())

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

Submission status: Accepted

Solution code:
def ABC_142_A():
    N = int(input())
    guusuu=0
    for i in range(N+1):
        if i%2 == 0 and i !=0:
            guusuu+=1

    print(1-(guusuu/N))




if __name__ == '__main__':

    ABC_142_A()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc142/tasks/abc142_a

N = int(input())

ans = 1 - ((N // 2) / N)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

n = int(input())
print(ceil(n/2)/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd

input = sys.stdin.readline

n = int(input())
f = n // 2;
print((n - f) / n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Odds of Oddness

from math import ceil

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