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

Submission status: Accepted

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

N = int(input())

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

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

print(solve())

Submission status: Accepted

Solution code:
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

# 必ず勝率が上がる勝ち方がある
def main():
    """ main """
    N = int(input())
    a = (N-1)//2+1
    print(a/N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
ans = 0
for i in range(1, n + 1):
    if i % 2 == 1:
        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 += 1
print(c / n)

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
print((n-int(n/2))/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:
#!/usr/bin/env python3


def main():
    n = int(input())
    num_odds = n - n // 2
    res = 1.0 * num_odds / n
    print("{:.12f}".format(res))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

n = int(input())

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
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())

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

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())
a = 0
b = 0
for i in range(1, N+1):
    b += 1
    if i % 2 == 1: a+=1

print(a/b)

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 = 0
for i in range(1, N+1):
    if i % 2 == 1:
        ans += 1
ans /= 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())
A=float((N+1)//2)
print(A/N)

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

    N = int(input())

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



if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


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

  print('{:.8f}'.format(1 - (n // 2) / n))


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
#    !/usr/bin/env python3
#    encoding: UTF-8
#    Modified: <28/Sep/2019 05:31:42 PM>


#    ✪ H4WK3yE乡
#    Mohd. Farhan Tahir
#    Indian Institute Of Information Technology (IIIT), Gwalior


import sys
import os
from io import IOBase, BytesIO


def main():
    n = int(input())
    if n & 1:
        x = n // 2 + 1
        print(x / n)
    else:
        print(0.5)


BUFSIZE = 8192


class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill():
            pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill()
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        py2 = round(0.5)
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2 == 1:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode("ascii"))
            self.read = lambda: self.buffer.read().decode("ascii")
            self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)


def get_array():
    return list(map(int, sys.stdin.readline().split()))


def get_ints():
    return map(int, sys.stdin.readline().split())


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


if __name__ == "__main__":
    main()

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:
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
if n%2==0:
    print(1/2)
else:
    print((n//2+1)/n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, deque
from functools import reduce
import math

input = sys.stdin.readline


def main():
    N = int(input())
    even = N // 2
    odd = N - even
    print(odd / N)

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
N = int(input())

odd = N//2

print((N-odd)/N)

Submission status: Accepted

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

# そのまま入力文字列の入力
s = int(input())

sho = s // 2

print(1.0 - (sho / s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019/09/28

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

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

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


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

Submission status: Accepted

Solution code:
a = int(input())

print("%f" % (1-(a//2)/a))

Submission status: Accepted

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

print(N2/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
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    if n%2==0: print(0.5)
    else: print((n//2+1)/n)
resolve()

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

print((n / 2 + ((n % 2) / 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:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    n = I()
    print((n-(n>>1))/n)
    return

#B
def B():
    n,k = LI()
    h = LI()
    ans = 0
    for i in h:
        if i >= k:
            ans += 1
    print(ans)
    return

#C
def C():

    return

#D
def D():

    return

#E
def E():

    return

#F
def F():

    return

#Solve
if __name__ == "__main__":
    A()

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

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

print(k/n)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())

e = N // 2
o = N - e

print (o / N)

Submission status: Accepted

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

print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc142/tasks
n = int(input())

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

Submission status: Accepted

Solution code:
#A問題
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 = 0
b = 0
for i in range(1,n+1):
    if i % 2 == 0:
        a += 1
    else:
        b += 1
print(b/(a+b))

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:
# ABC141a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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/(odd+even))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

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

print(odd/(odd+evn))

Submission status: Accepted

Solution code:

import sys
input = sys.stdin.readline
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
# A = [ int(input()) for _ in range(N) ]
##############################

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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()

  return -(-n//2)/n

# main()
print(main())

Submission status: Accepted

Solution code:
import sys
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()

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

Submission status: Accepted

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

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

    print(cnt / N)

main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    return math.ceil(N/2)/N


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(N: int):
    ret = 1.0 - (N // 2) / N
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N=int(input())
print((N-N//2)/N)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

def main():
    N = int(input())
    even = N // 2
    print((N-even)/ N)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# Setup
import sys
import collections
sys.setrecursionlimit(4100000)

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(N: int):
    if N % 2 == 0:
        print(0.5)
    else:
        print(-(-N//2)/N)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

a = int(input())
print((a-int(a/2))/a)

Submission status: Accepted

Solution code:
N = input()
print "%.10f"%((N+1)/2/float(N))

Submission status: Accepted

Solution code:
import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')

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

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

sol()

Submission status: Accepted

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

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

n = int(input())
#a = [int(i) for i in readline().split()]


print(1-n//2/n)

Submission status: Accepted

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

N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

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

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
a = 0
for i in range(1, N +1):
    if i & 1:
        a += 1

print(a / N)

Submission status: Accepted

Solution code:
mod = 1000000007
MOD = 998244353
ii = lambda :  int(input())
si = lambda :  input()
dgl = lambda : list(map(int, input()))
f = lambda :   map(int, input().split())
il = lambda :  list(map(int, input().split()))
it = lambda :  tuple(map(int, input().split()))
ls = lambda :  list(input())
n=ii()
print(((n+1)//2)/n)

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, deque
from heapq import *
sys.setrecursionlimit(200000)
input = sys.stdin.readline

# N, M, = map(int, input().split())
N = int(input())
# L = [int(v) for v in input().split()]
# L = [[int(v) for v in input().split()] for _ in range(N)]
# L = [int(input()) for _ in range(N)]
# L = [list(input().strip())  for _ in range(N)]
# S = input().strip()

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

print(s / N)

Submission status: Accepted

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

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

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

print(ans/n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()

    ans = 1-(N//2)/N
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    
    n = int(input())
    cnt = (n + 1) // 2
    
    print(cnt / n)
    
    return 0

main()

Submission status: Accepted

Solution code:
N = int(input())
o = N//2 + N%2
print(o/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 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:
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    print(1 - n // 2 / n)


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans = []
for i in range(n):
    ans.append(0)
for i in range(n):
    ans[a[i]-1] = i +1
for i in range(len(ans)):
    print(ans[i], end=" ")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

order = []

for i in range(1,n+1):
    s = a.index(i)
    order.append(s+1)

print(" ".join(map(str, order)))

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
a  = []
for i in range(N):
    a.append([A[i], i])
a.sort()
b = []
for i in a:
    b.append(i[-1]+1)
print(*b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
N = list(map(int,input().split()))

c=0

for i in range(A):
  if N[i] >= B:
    c+=1
  else:
    pass
  i+=1
print(c)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
N = list(int,input().split())

c=0

for i in range(A):
  if N[i] >= B:
    c+=1
  else:
    pass
  i+=1
print(c)

Submission status: Runtime Error

Solution code:
n,k = map(int, input().split())
ki = list(map(int,input().split()))
count = 0

for i in range(n):
  if ki[i] >= k:
    count += 1
  else:
    pass

print(count)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
ans = 1
X = []
while(ans<N+1):
    for i in range(N):
        if A[i] == ans:
            ans += 1
            X.append(str(i+1))
L=' '.join(X)
print(L)

Submission status: Runtime Error

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

a, b = map(int, input().split())

if a > (b * 2):
    print(a - (b * 2))
else:
    print(0)

Submission status: Runtime Error

Solution code:
a = int(input())

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

Submission status: Runtime Error

Solution code:
from math import gcd
from copy import copy
a, b = map(int, input().split())

def div(x):
    ret = []
    for i in range(1, int(x ** 0.5) + 1):
        if x % i == 0:
            ret.append(i)
            ret.append(x // i)
    
    return ret

def judge_prime(x):
    cnt = 0
    for i in range(1, int(x ** 0.5) + 1):
        if x % i == 0:
            cnt += 1
        if cnt >= 2:
            return False
    return True

div_a = div(a)
div_b = div(b)

data = list(set(div_a) & set(div_b))

ans = 0
for x in data:
    if judge_prime(x):
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

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(f'{ans:.08f}')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    a, b = map(int, open(0).read().split())

    ans = max(0, a - b * 2)
    print(ans)
    return()

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
if n%2==1:
  print(str(((n-1)/2+1)/2)+"\n")
else:
  print(str(1/2)+"\n")

Submission status: Runtime Error

Solution code:
N = int(input())
l = list(map(int,input().split()))
m = []

for i in range(1,N+1):
  m.append(l.index(i)+1)
  
print(*m)

Submission status: Runtime Error

Solution code:
N = int(input())

if N % 2 != 0:
  print('0.6000000000')
else:
  if N == 1:
    print('1.0000000000')
    break
  else:
  	print('0.5000000000')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i in a:
    ans[i-1]=a.index(i)+1
print(*ans)

Submission status: Runtime Error

Solution code:

N = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
LIST=list(map(int,input().split()))
kazu=0
for i in LIST:
  if i>=k:
    kazu=kazu+1
print (kazu)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
LIST=list(map(int,input().split()))
kazu=0
for i in LIST:
  if i>=k:
    kazu=kazu+1

print (kazu)