Buggy python submission (verdict: Runtime Error):
from math import gcd

N, M = map(int, input().split())
A = [int(i) // 2 for i in input().split()]  

A_lcm = 1
for i in range(N):
    A_lcm *= A[i] // gcd(A_lcm, A[i])
    
for i in A:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()

print((M // A_lcm + 1) // 2)

Fixed submission:
from fractions import gcd

N, M = map(int, input().split())
A = [int(i) // 2 for i in input().split()]  

A_lcm = 1
for i in range(N):
    A_lcm *= A[i] // gcd(A_lcm, A[i])
    
for i in A:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()

print((M // A_lcm + 1) // 2)

Buggy python submission (verdict: Runtime Error):
import fractions
def lcm(a, b):
    return a // fractions.gcd(a, b) * b

N, M = map(int, input().split())
A = list(map(int, input().split()))

A_half = [0.5 * a for a in A]
A_lcm = A_half[0]

for i in range(1, N):
    A_lcm = lcm(int(A_lcm), int(A_half[i]))

for i in A_half:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()
ans = (M // A_lcm + 1) // 2
print(int(ans))

Fixed submission:
from fractions import gcd

N, M = map(int, input().split())
A = [int(i) // 2 for i in input().split()]  

A_lcm = 1
for i in range(N):
    A_lcm *= A[i] // gcd(A_lcm, A[i])
    
for i in A:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()

print((M // A_lcm + 1) // 2)

Buggy python submission (verdict: Runtime Error):
import fractions
def lcm(a, b):
    return a * b / fractions.gcd(a, b)

N, M = map(int, input().split())
A = list(map(int, input().split()))

A_half = [0.5 * a for a in A]
A_lcm = A_half[0]

for i in range(1, N):
    A_lcm = lcm(int(A_lcm), int(A_half[i]))

for i in A_half:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()
ans = (M // A_lcm + 1) // 2
print(int(ans))

Fixed submission:
from fractions import gcd

N, M = map(int, input().split())
A = [int(i) // 2 for i in input().split()]  

A_lcm = 1
for i in range(N):
    A_lcm *= A[i] // gcd(A_lcm, A[i])
    
for i in A:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()

print((M // A_lcm + 1) // 2)

Buggy python submission (verdict: Runtime Error):
import fractions
def lcm(a, b):
    return a * b / fractions.gcd(a, b)

N, M = map(int, input().split())
A = list(map(int, input().split()))

A_half = [0.5 * a for a in A]
A_lcm = A_half[0]

for i in range(1, N):
    A_lcm = lcm(int(A_lcm), int(A_half[i]))

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

print(int(ans))

Fixed submission:
from fractions import gcd

N, M = map(int, input().split())
A = [int(i) // 2 for i in input().split()]  

A_lcm = 1
for i in range(N):
    A_lcm *= A[i] // gcd(A_lcm, A[i])
    
for i in A:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()

print((M // A_lcm + 1) // 2)

Buggy python submission (verdict: Runtime Error):
import math
def lcm(a, b):
    return a * b / math.gcd(a, b)

N, M = map(int, input().split())
A = list(map(int, input().split()))

A_half = [0.5 * a for a in A]
A_lcm = A_half[0]

for i in range(1, N):
    A_lcm = lcm(int(A_lcm), int(A_half[i]))

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

print(int(ans))

Fixed submission:
from fractions import gcd

N, M = map(int, input().split())
A = [int(i) // 2 for i in input().split()]  

A_lcm = 1
for i in range(N):
    A_lcm *= A[i] // gcd(A_lcm, A[i])
    
for i in A:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()

print((M // A_lcm + 1) // 2)

Buggy python submission (verdict: Runtime Error):
import math
def lcm(a, b):
    return a * b / math.gcd(a, b)

N, M = map(int, input().split())
A = list(map(int, input().split()))

A_half = [0.5 * a for a in A]
A_lcm = A_half[0]

for i in range(1, N):
    A_lcm = lcm(int(A_lcm), int(A_half[i]))

ans = (M // A_lcm) // 2 if (M // 2) % 2 == 0 else (M // A_lcm) // 2 + 1
print(int(ans))

Fixed submission:
from fractions import gcd

N, M = map(int, input().split())
A = [int(i) // 2 for i in input().split()]  

A_lcm = 1
for i in range(N):
    A_lcm *= A[i] // gcd(A_lcm, A[i])
    
for i in A:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()

print((M // A_lcm + 1) // 2)