Problem:


Score : 100 points

Problem Statement

Given is an integer N.

Takahashi chooses an integer a from the positive integers not greater than N with equal probability.

Find the probability that a is odd.

Constraints

1 \leq N \leq 100

Input

Input is given from Standard Input in the following format:

N

Output

Print the probability that a is odd.
Your output will be considered correct when its absolute or relative error from the judge's output is at most 10^{-6}.

Sample Input 1

4

Sample Output 1

0.5000000000

There are four positive integers not greater than 4: 1, 2, 3, and 4. Among them, we have two odd numbers: 1 and 3. Thus, the answer is \frac{2}{4} = 0.5.

Sample Input 2

5

Sample Output 2

0.6000000000

Sample Input 3

1

Sample Output 3

1.0000000000



Sample input:
4


Sample output:
0.5000000000

Submission status: Runtime Error

Solution code:
N,K=map(int, input().split()) 
h=list(map(int, input().split()))

ans = len([1 for x in h if x >= K])

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
is_odd = lambda x: x % 2 == 0

import fileinput
for line in fileinput.input():
	print(sum([1 for x in range(1, x) if is_odd(x)]/x)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
l = list(map(int, input().split()))
ans = [1 if i >= K else 0 for i in l]
print(sum(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
St=[int(x) for x in input().split()]
num=1
out=[]
while num<=N:
  for i in range(N):
    if St[i] ==num:
      out.append(i)
      num+=1

for i in range(N):
  print(out[i]+1,end=" ")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

n = int(input())

count = 0

for i in range(n):
    if i / 0:
        count += 1
    else:
        pass

print(count/n)

Submission status: Runtime Error

Solution code:
no=int(input())
n=no
c=0
while(n):
  if n == 0:
    print c/n
    break
  if n%2 == 1:
    c += 1

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    for j in range(n):
        if a[j] == (i+1):
            if (i+1) != n:
                print(j+1, end = " ")
            else:
                print(j+1)

Submission status: Runtime Error

Solution code:
input_line=input().rstrip.split()
kisuu=0
for number in range(1,int(input_line)+1):
  if number%2==1:
    kisuu=kisuu+1
possi=kisuu/int(input_line)
print(possi)

Submission status: Runtime Error

Solution code:
#E https://atcoder.jp/contests/abc142/submissions/7853616
def main():
    n, m = map(int, input().split())
    inf = 10**9 #この10億は何に使う？->とにかくデカい数字。
    bit_dp = [inf for _ in range(2**(n))] #10億を2**n個並べる配列を作る。n=12 => 4096個
    bit_dp[0] = 0
    for i in range(m):
        a, b = map(int, input().split())
        c = list(map(int, input().split()))#鍵1個につきa,b,c1~cbを決める
        bit_n = 0
        for i in c:
            bit_n |= 1 << i - 1 #ここで何番目をあけられるのかをbit_nで定義する。1と3ならbit_n=(5)101、2と3なら110(6)
        for i in range(2**n):
            if bit_dp[i|bit_n] > bit_dp[i] + a:
                bit_dp[i|bit_n] = bit_dp[i] + a
    if bit_dp[-1] >= inf:
        print(-1)
    else:
        print(bit_dp[-1])
                
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N = input(int())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = []
for i in range(1, N+1, 1):
    ans.append(A.index(i)+1)
    
for j in range(N):
    print(ans[j], end=" ")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
# bを奇数の数と仮定して
ｂ = 'math.ceil(n/2)'
#　奇数/全体ってやればいいのかな？
print(b/ｎ)

Submission status: Runtime Error

Solution code:
n = int(input())
# bを奇数の数と仮定して
b = 'math.ceil(n/2)'
#　奇数/全体ってやればいいのかな？
N　= b/ｎ

Submission status: Runtime Error

Solution code:
n = int(input())
# bを奇数の数と仮定して
ｂ = math.ceil(n/2)
#　奇数/全体ってやればいいのかな？
N　= b/ｎ

Submission status: Runtime Error

Solution code:
from collections import*
n,m,*t=map(int,open(0).read().split())
i,o,r=[0]*n,[[]for _ in'_'*n],[]
for a,b in zip(*[iter(t)]*2):
  o[a-1]+=b-1,
  i[b-1]+=1
q=deque(v for v in range(n)if i[v]<1)
while q:
  v=q.popleft()
  r+=v,
  for w in o[v]:
    i[w]-=1
    if i[w]==0:q+=w,
print(-(len(r)==n))
for j,k in enumerate(i):
  if i[j]>0: print(j+1)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
import math
 
a = int(input())
 
gusu = a // 2
ngusu = math.floor(gusu)
 
if gusu > ngusu:
  kisu = ngusu + 1
else:
  kisu = ngusu
kaku = kisu // a 
print(raund(kaku,6)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
import math

a = int(input())
 
gusu = a // 2
ngusu = math.floor(gusu)
 
if gusu > ngusu:
  kisu = ngusu + 1
else:
  kisu = ngusu

kakuritu　= kisu // a 
print(kakuritu)

Submission status: Runtime Error

Solution code:
import sys


def input():
    return sys.stdin.readline().strip().decode('utf-8')


def solve(N):
    odd_count = 0

    for x in range(0, N)[::-1]:
        if x // 2 != 0:
            odd_count += 1

    if N == 1:
        return 1

    return odd_count / N


N = int(input())

print(solve(N))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=[]
for i in range(n):
       a〔int(input())〕=i
print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
h = list(map(int, input().split()))
 
cnt = 0
for i in range(len(h)):
    if h[i] >= K:
        cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
import math
from fractions import gcd


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


s = int(math.sqrt(g))

f = {}
for i in range(2, s+1):
    while g % i == 0:
        f[i] = f.get(i, 0) + 1
        g = g/i
if g != 1:
    f[g] = f.get(g, 0) + 1

print(len(f)+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()
if N%2==0:
  answer = 1.0/2
else:
  answer = ((N-1)/2 + 1) /((N-1)/2)
return answer

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
N=input()
if N%2==0:
  answer = 1.0/2
else:
  answer = ((N-1)/2 + 1) /(N-1)/2
print(answer)

Submission status: Runtime Error

Solution code:
from sys import stdin
N = stdin.readline().rstrip()
if N % 2 == 0:
  print(1/2)
else:
  print((N+1)/(2N))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import bisect
n = int(input())
k = int(input())
array = list(map(int,input().strip().split()))
array.sort()
index = bisect.bisect_left(array,k)
print (index)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


def solve(A: int, B: int):
    while A % B:
        tmp = B
        B = A % B
        A = tmp
    if B == 1:
        print(1)
    else:
        ans = factorization(B)
        print(len(ans)+1)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


a, b = list(map(int, input().split()))
g = math.gcd(a, b)
if g == 1:
    print(factorization(g))
    print('1')
else:
    print(factorization(g))
    print(len(factorization(g))+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

N = int(input())

kisu = 0
gusu = 0

for i in range(N):
  if i % 2 = 0:
    kisu += 1
  else:
    gusu += 1
    
kakuritsu = kisu // (gusu + kisu)

print(kakuritsu)

Submission status: Runtime Error

Solution code:
a=input()
count=0
for x in range(1,a+1):
  if x%2 ==1:
    count+=1
else:
    print(float(count)/a)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

n = input()

ans = NA

if N % 2 == 1:
    ans = (N - 1) / 2) / N

else:
    ans = 0.5000000000

print(ans)

Submission status: Runtime Error

Solution code:
import math

n = input()

ans = NA

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

ans = ans / N

print(ans)

Submission status: Runtime Error

Solution code:
import math

n = input()

ans = NameError

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

ans = ans / N

print(ans)

Submission status: Runtime Error

Solution code:
from sys import setrecursionlimit as SRL, stdin

SRL(10 ** 7)
rd = stdin.readline
rrd = lambda: map(int, rd().strip().split())
n, m = rrd()

e = [[] for _i in range(1 << 13)]

p = []
for i in range(m):
    a, b = rrd()
    lst = list(rrd())
    g = 0
    for j in lst:
        g |= 1 << (j - 1)
    p.append((a, g))

for i in range(1 << n):
    for j in p:
        e[i].append((i | j[1], j[0]))
from math import inf

dis = [inf] * (1 << 13)
vis = [0] * (1 << 13)
dis[0] = 0

from heapq import *

q = [(0, 0)]
while len(q):
    ds, now = heappop(q)
    if vis[now]:
        continue
    vis[now] = 1
    for next, cost in e[now]:
        if dis[next] > dis[now] + cost:
            dis[next] = dis[now] + cost
            heappush(q, (dis[next], next))

if dis[(1 << n) - 1] == inf:
    print(-1)
else:
    print(dis[(1 << n) - 1])

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
friends = map(int, input().split())


n = len([1 for x in friends if x>=K])

print(n)

Submission status: Runtime Error

Solution code:
N = int(input())

if N == 1:
    print(float(N))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def main():
    #入力
    [n, k] = [int(i) for i in input().split()] 
    h = [int(i) for i in input().split()] 

    print(len(able_ride_jet(k, h)))


def able_ride_jet(const, heights):
    """ ジェットコースターに乗れる人の身長のリストを返す関数
    """
    return list(filter(lambda x: x >= const, heights))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

count=0
for i in range(n):
    if h[i]>=k:
         count+=1
    else:
         count+=0
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n = II()
    ans = 0
    for i in range(1, n + 1):
        ans += i & 1
    print(ans/n)
    return

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

#C
def C():
    n = II()
    a = LI()
    d = defaultdict(int)
    for i in range(n):
        d[a[i] + 1] = i + 1
    for _, v in sorted(d.items()):
        print(v, end=" ")
    print()
    return

def primes(n):
    """ Input n>=6, Returns a list of primes, 2 <= p < n """
    """ 6以上の数であれば p (素数) <= n のlistを返す """
    n, correction = n-n%6+6, 2-(n%6>1)
    sieve = [True] * (n//3)
    for i in range(1,int(n**0.5)//3+1):
        if sieve[i]:
            k=3*i+1|1
            sieve[      k*k//3      ::2*k] = [False] * ((n//6-k*k//6-1)//k+1)
            sieve[k*(k-2*(i&1)+4)//3::2*k] = [False] * ((n//6-k*(k-2*(i&1)+4)//6-1)//k+1)
    return [2,3] + [3*i+1|1 for i in range(1,n//3-correction) if sieve[i]]

#D
def D():
    a, b = LI()
    p = primes(10**6)
    ans = 1
    for i in p:
        if a % i == b % i == 0:
            ans += 1
    print(ans)
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    D()

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
friends = list(map(int, input().split()))

n = len([1 for x in friends if x>K])

print(n)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
a=[(a[x],x+1) for x in range(len(a))]
a.sort()
for x in a:
    print(x[1],end=' ')

Submission status: Runtime Error

Solution code:
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <set>
#include <map>
#include <functional>
#include <string>
#include <cmath>
#include <cassert>

using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main(void)
{
    int N;
    scanf("%d", &N);

    float ans;
    ans = ((N + 1) / 2) / float(N);
    printf("%f", ans);
}

Submission status: Runtime Error

Solution code:
N = int(input())

odd = 0
even = 0
for i in range(N-1):
	if i % 2 == 0:
		odd += 1
	else:
		even += 1

total = odd + even
print(odd/total)

Submission status: Runtime Error

Solution code:
N = int(input())

odd = 0
even = 0
for i in range(N-1):
	if i % 2 == 0:
		odd += 1
	else:
		even += 1

print(odd/(even + odd))

Submission status: Runtime Error

Solution code:
N = int(input())

odd = 0
even = 0
for i in range(N-1):
	if i % 2 == 0:
		odd += 1
	else:
		even += 1

print(odd/(even + odd))

Submission status: Runtime Error

Solution code:
def factorization(n):
    if n == 1:
        return []
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append(i)
    if temp != 1:
        arr.append(temp)
    if not arr:
        arr.append(n)
    return arr


input_values = list(map(int, input().split()))
print(len(list(set(factorization(input_values[0])) & set(factorization(input_values[1])))) + 1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k = input().split()
n = int(n) #友人の数
k = int(k) #基準の高さ
h = input().split()
result = 0
#各人の身長を基準の高さと比較
for i in range(n):
  if k <= int(h[i]):
    result += 1
  else:
    result -= 0
print(result)

Submission status: Runtime Error

Solution code:
num, jet = (input().split())

height = list(map(int, input().split()))
ans = 0

for n in height:
    if n >= int(jet):
        ans += 1
    else:
        continue

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

print(f'{(N+1)//2/N}')

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
def gcd(x, y):
        while y != 0:
            x, y = y, x%y
        return x
    
def factorize(n):
    factor = []
    for num in range(2, n*n+1):
        while n % num == 0:
            n //= num
            factor.append(num)
    return factor
    
g = gcd(A, B)
f = factorize(g)
print(len(f)+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input('<< '))
k=0
for i in range(1,a):
  if i%2 == 1:
    k += 1
  v = k/a

print v

Submission status: Runtime Error

Solution code:
import random
a = int(input('<< '))
k=0
for i in range(1,a):
  if i%2 == 1:
    k += 1
  v = k/a

print v

Submission status: Runtime Error

Solution code:
import random
a = int(input('<< '))
k=0
g=0
for i in range(1,a):
  if i%2 == 1:
    k += 1
  v = k/a

print(v)

Submission status: Runtime Error

Solution code:
import random
a = int(input('<< '))
k=0
g=0
for i in range(1,a):
  if i%2 == 1:
    k += 1
  v = k/a

print v

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k = input().split()
n = int(n) #友人の数
k = int(k) #基準の高さ
m = []
result = 0
for i in range(n):
  m.append(int(input()))
#各人の身長を基準の高さと比較
for i in range(len(m)):
  if k <= m[i]:
    result += 1
  else:
    result += 0
print(result)

Submission status: Runtime Error

Solution code:
n, k = input().split()
n = int(n) #友人の数
k = int(k) #基準の高さ
m = []
result = 0
for i in range(n):
  m.append(int(input().split()))
#各人の身長を基準の高さと比較
for i in range(len(m)):
  if k <= m[i]:
    result += 1
  else:
    result += 0
print(result)

Submission status: Runtime Error

Solution code:
a, b = [int(item) for item in input().split()]

if b > a:
    c = a
    a = b
    b = c


# 最大公約数を求める
def gcd(a, b):
    while b > 1:
        a, b = b, a%b
    return a

# 公約数でかつ素数の_listを求める
prime_devisor_list = [1, 2]

import math

def is_prime(num):
    if num in [1, 2]:
        return True
    else:
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                return False
        return True

for i in range(3, gcd(a, b)+1):
    if a % i == 0 and b % i == 0:
        # i can be ans
        # check pirme

        if is_prime(i):
            prime_devisor_list.append(i)

# 数をこたえる
len(prime_devisor_list)

Submission status: Runtime Error

Solution code:
n = int(raw_input())
n = n +0.000000
if not n%2:
  print 0.500000000
else:
  print((n/2)/n)

Submission status: Runtime Error

Solution code:
n = int(raw_input())
if not n%2:
  print 0.500000000
else:
  print((n/2)/n)

Submission status: Runtime Error

Solution code:
if N%2:
  return 0.6
else:
  return 0.5

Submission status: Runtime Error

Solution code:
N=map(int,input().split())
count=0
for i in N:
  if N[i]%2!=0
  	count+=1
  else:
    pass
print(count//len(N))

Submission status: Runtime Error

Solution code:
N=map(int,input().split())
count=0
while N<=0:
  if N%2!=0
  	count+=1
  else:
    pass
print(count//len(N))

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
x = list(range(1, int(input())+1)
x_odds = list(filter(lambda xx: xx % 2 == 1, x))
print(float(len(x_odds) / len(x))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
def get_sieve_of_eratosthenes(n):
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]

A,B = map(int,input().split())
 
GCD = math.gcd(A,B)
 
prime_list = get_sieve_of_eratosthenes(GCD)
counter = 1
for p in prime_list:
    if GCD % p == 0:
        counter += 1
        while(GCD % p == 0):
            GCD = GCD // p
print(counter)

Submission status: Runtime Error

Solution code:
import sys
int N = input()
float a
if N === 1:
	a = N/1
elif:
	if N%2 == 0:
    	a = N/2
    elif:
      	a = (N-2)/N
        
print(a)

Submission status: Runtime Error

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

Solution code:
a,b=[int(x) for x in input().split()]
i=1
def gcd(a,b):
  a,b=max(a,b),min(a,b)
  if a%b==0:
    return b
  else:
    return gcd(b,a%b)
g=gcd(a,b)
l=[]
while(i*i<=g):
    if g%i==0 and i*i!=g:
        l.append(i)
        l.append(g//i)
    if i*i==g:
        l.append(i)
    i=i+1
l=sorted(l)
i=1
while(i<len(l)):
    if l[i]!=0:
        j=i+1
        while(j<len(l)):
            if l[j]%l[i]==0:
                l[j] = 0
            j=j+1
    i=i+1
l=list(filter ( lambda x:x!=0,l))
print(len(l))

Submission status: Runtime Error

Solution code:

a,b=[int(x) for x in input().split()]
i=1
def gcd(a,b):
  a,b=max(a,b),min(a,b)
  if a%b==0:
    return b
  else:
    return gcd(b,a%b)
g=gcd(a,b)
l=[]
while(i*i<=g):
    if g%i==0 and i*i!=g:
        l.append(i)
        l.append(g//i)
    if i*i==g:
        l.append(i)
    i=i+1
l=sorted(l)
i=1
while(i<len(l)):
    if l[i]!=0:
        j=i+1
        while(j<len(l)):
            if l[j]%l[i]==0:
                l[j] = 0
            j=j+1
    i=i+1
l=list(filter ( lambda x:x!=0,l))
print(len(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


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

ansa=prime_factorize(a)
ansb=prime_factorize(b)
count=0

for i in range(len(ansa)):
    if ansa[i] in ansb:
        count+=1
    


print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from math import sqrt
def get_divisor(num):
	arr = [i for i in range(1,int(sqrt(num))) if num % i == 0]
	arr += [num // i for i in reversed(arr)]
	return arr

def get_common(num1, num2):
	list_a = get_divisor(num1)
	list_b = get_divisor(num2)
	return [i for i in list_a if i in list_b]

def prime_ch(num):
	if num == 1:
		return False
	for i in list(range(2,int(sqrt(num))+1)):
		if num % i == 0:
			return False
	return True


A,B = list(map(int,input().split()))[:2]
common = get_common(A,B)
c_prime = [p for p in common if prime_ch(p)]
print((len(c_prime)+1))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k = map(int(), input().split())
j = 0
ki = [map(int(), input().split())]
for num in ki:
    if num < k:
        j += 1
print(j)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
h = list(map(int, input().split()))

count = 0
for i in range(N):
  if h[i] >= K:
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
import sys
N = int(sys.stdin.readline())

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

Submission status: Runtime Error

Solution code:
N, M = [int(x) for x in input().strip().split(" ")]

def dfs(v):
    pvs = set([v])
    path = [v]
    def _dfs(v, path):
        for u in d[v]:
            if u in pvs:
                for i, c in enumerate(path):
                    if c == u:
                        break
                return path[i+1:]  + [u]
            if u in vs:
                continue
            pvs.add(u)
            vs.add(u)
            loop = _dfs(u, path + [u])
            pvs.remove(u)
            if loop:
                return loop
        return False
    return _dfs(v, path)

vs = set()
def dfs_w(v, d):
    # dfs while版 
    vs.add(v)
    pvs = set()
    stack = [v]
    path = []
    while True:
        if len(stack) == 0:
            break
        v = stack.pop()
        if v < 0:
            pvs.remove(path[-1])
            path.pop()
        else:
            pvs.add(v)
            path.append(v)
            for u in d[v]:
                if u in pvs:
                    for i, c in enumerate(path):
                        if c == u:
                            break
                    return path[i+1:]  + [u]
                if u in vs:
                    continue
                vs.add(u)
                stack += [-v, u]
    return False

d = [set() for _ in range(N+1)]
for _ in range(M):
    a, b = [int(x) for x in input().strip().split(" ")]
    d[a].add(b)

for i in range(N):
    i += 1
    if i in vs:
        continue
    loop = dfs_w(i, d)
    if loop:
        break

if not loop:
    print(-1)
    import sys
    sys.exit()

v2i = [-1 for _ in range(N+1)]
for i, v in enumerate(loop):
    v2i[v] = i

nloop, pvs = [], set()
v = loop[0]
f = False
while True:
    nloop.append(v)
    pvs.add(v)
    max_i = max_i_l = -1
    for u in d[v]:
        if v2i[u] == -1:
            continue
        if v2i[v] > v2i[u] and u in pvs:
            f = True
            max_i_l = max(max_i_l, v2i[u])
        if v2i[u] > v2i[v]:
            max_i = max(max_i, v2i[u])
    if f:
        nloop.append(loop[max_i_l])
        break
    v = loop[max_i]

for i, x in enumerate(nloop):
    if x == nloop[-1]:
        break
nloop = nloop[i+1:]
print(len(nloop))
for v in nloop:
    print(v)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Solution code:
n, k = map(int, input().split())
h = list(map(int,input().split()))
oppai = 0
for i in range(n):
  if h[i] >= k:
    oppai += 1
print(oppai)

Submission status: Runtime Error

Solution code:
N = input()
n_even = int(N / 2)
n_odd = n_even + 1
chance = float(n_odd / N)
print(chance)

Submission status: Runtime Error

Solution code:
N = input()
a = N//2
print(round(a/N,6))

Submission status: Runtime Error

Solution code:
N = input()
a = N//2
print(a/N)

Submission status: Runtime Error

Solution code:
n=int(input())
A=list(map(int,input().split()))
numbers=list(range(1,n+1))              

D=dict(zip(A,numbers))
for a in sorted(A):
    print(D[a],end=" ")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
print(((N+1)//2/N)

Submission status: Runtime Error

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

Submission status: Runtime Error

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