Buggy python submission (verdict: Runtime Error):
import fractions
from functools import reduce
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]=a[i]//2
def lcm_base(x,y):
    return (x*y)//fractions.gcd(x,y)
def lcm_list(numbers):
    return reduce(lcm_base,numbers,1)
f2=lcm_list(a)

ans=0
for i in range(n):
    if f2/a[i]%2!=1:
        print(ans)
        break
else:
    ans=m//f2
    print((ans+1)//2)

Fixed submission:
import fractions
from functools import reduce
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]=a[i]//2
def lcm_base(x,y):
    return (x*y)//fractions.gcd(x,y)
def lcm_list(numbers):
    return reduce(lcm_base,numbers,1)
f2=lcm_list(a)

ans=0
for i in range(n):
    if f2//a[i]%2!=1:
        print(ans)
        break
else:
    ans=m//f2
    print((ans+1)//2)

Buggy python submission (verdict: Runtime Error):
import fractions
from functools import reduce
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]=a[i]//2
def lcm_base(x,y):
    return (x*y)//fractions.gcd(x,y)
def lcm_list(numbers):
    return reduce(lcm_base,numbers,1)
f2=lcm_list(a)

ans=0
for i in range(n):
    if f2/a[i]%2!=1:
        print(ans)
        break
else:
    ans=m//f2
    print((ans+1)//2)

Fixed submission:
import fractions
from functools import reduce
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]=a[i]//2
def lcm_base(x,y):
    return (x*y)//fractions.gcd(x,y)
def lcm_list(numbers):
    return reduce(lcm_base,numbers,1)
f2=lcm_list(a)

ans=0
for i in range(n):
    if f2//a[i]%2!=1:
        print(ans)
        break
else:
    ans=m//f2
    print((ans+1)//2)

Buggy python submission (verdict: Runtime Error):
import fractions
n,m=map(int,input().split())
a=list(map(int,input().split()))
a=list(set(a))
n=len(a)
#print(a)
for i in range(n):
    a[i]=a[i]//2
f2=1
f=a[0]
for i in range(n):
    f=fractions.gcd(f,a[i])
for i in range(n):
    f2*=a[i]
f2=f2//(f*(n-1))
ans=0
for i in range(n):
    if f2/a[i]%2!=1:
        print(ans)
        break
else:
    ans=m//f2
    print((ans+1)//2)

Fixed submission:
import fractions
from functools import reduce
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]=a[i]//2
def lcm_base(x,y):
    return (x*y)//fractions.gcd(x,y)
def lcm_list(numbers):
    return reduce(lcm_base,numbers,1)
f2=lcm_list(a)

ans=0
for i in range(n):
    if f2//a[i]%2!=1:
        print(ans)
        break
else:
    ans=m//f2
    print((ans+1)//2)

Buggy python submission (verdict: Runtime Error):
import fractions
n,m=map(int,input().split())
a=list(map(int,input().split()))
#print(a)
for i in range(n):
    a[i]=a[i]//2
f2=1
for i in range(n):
    f=fractions.gcd(f2,a[i])
    f2=a[i]*f2//f
#print(f2)
ans=0
for i in range(n):
    if f2/a[i]%2!=1:
        print(ans)
        break
else:
    ans=m//f2
    print((ans+1)//2)

Fixed submission:
import fractions
from functools import reduce
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]=a[i]//2
def lcm_base(x,y):
    return (x*y)//fractions.gcd(x,y)
def lcm_list(numbers):
    return reduce(lcm_base,numbers,1)
f2=lcm_list(a)

ans=0
for i in range(n):
    if f2//a[i]%2!=1:
        print(ans)
        break
else:
    ans=m//f2
    print((ans+1)//2)