Buggy python submission (verdict: Runtime Error):
import sys #追加
sys.setrecursionlimit(10**9)

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   ans = (ans * b) // gcd(ans, b)

import numpy as np
print(ans, al)
al = ans % (np.array(al) / 2)
if any(al):
   print(0)
   import sys
   sys.exit()
   

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))



Fixed submission:
import sys #追加
sys.setrecursionlimit(10**9)
import time
s = time.time()

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))

Buggy python submission (verdict: Time Limit Exceeded):
import sys #追加
sys.setrecursionlimit(10**9)

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))


Fixed submission:
import sys #追加
sys.setrecursionlimit(10**9)
import time
s = time.time()

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))

Buggy python submission (verdict: Time Limit Exceeded):
import sys #追加
sys.setrecursionlimit(10**9)

n,m = map(int,input().split())
al = list(map(int,input().split()))




bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))


Fixed submission:
import sys #追加
sys.setrecursionlimit(10**9)
import time
s = time.time()

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))

Buggy python submission (verdict: Time Limit Exceeded):
import sys #追加
sys.setrecursionlimit(10**9)

n,m = map(int,input().split())
al = list(map(int,input().split()))

#a,bの最大公約数
def gcd(a, b):
   while b:
       a, b = b, a % b
   return a

#a,bの最小公倍数
def lcm(a, b):
   return a * b // gcd (a, b)


bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))


Fixed submission:
import sys #追加
sys.setrecursionlimit(10**9)
import time
s = time.time()

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))

Buggy python submission (verdict: Runtime Error):
import sys #追加
sys.setrecursionlimit(10**9)

n,m = map(int,input().split())
al = list(map(int,input().split()))

#a,bの最大公約数
def gcd(a, b):
   while b:
       a, b = b, a % b
   return a

#a,bの最小公倍数
def lcm(a, b):
   return a * b // gcd (a, b)


bl = [i//2 for i in al]
import numpy as np
ans = 1
for b in bl:
   ans = np.lcm(b, ans)

for a in al:
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))


Fixed submission:
import sys #追加
sys.setrecursionlimit(10**9)
import time
s = time.time()

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))

Buggy python submission (verdict: Time Limit Exceeded):
import sys #追加
sys.setrecursionlimit(10**9)

n,m = map(int,input().split())
al = list(map(int,input().split()))

#a,bの最大公約数
def gcd(a, b):
   while b:
       a, b = b, a % b
   return a

#a,bの最小公倍数
def lcm(a, b):
   return a * b // gcd (a, b)


bl = [i//2 for i in al]
bl = sorted(bl, reverse=True)
ans = 1
for b in bl:
   ans = lcm(ans, b)

for a in al:
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))


Fixed submission:
import sys #追加
sys.setrecursionlimit(10**9)
import time
s = time.time()

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))

Buggy python submission (verdict: Time Limit Exceeded):
import sys #追加
sys.setrecursionlimit(10**9)

n,m = map(int,input().split())
al = list(map(int,input().split()))

#a,bの最大公約数
def gcd(a, b):
   while b:
       a, b = b, a % b
   return a

#a,bの最小公倍数
def lcm(a, b):
   return a * b // gcd (a, b)


bl = [i//2 for i in al]
bl = sorted(bl)
ans = 1
for b in bl:
   ans = lcm(ans, b)

for a in al:
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))


Fixed submission:
import sys #追加
sys.setrecursionlimit(10**9)
import time
s = time.time()

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
al = list(map(int,input().split()))

#a,bの最大公約数
def gcd(a, b):
   while b:
       a, b = b, a % b
   return a

#a,bの最小公倍数
def lcm(a, b):
   return a * b // gcd (a, b)


bl = [i//2 for i in al]

ans = 1
for b in bl:
   ans = lcm(ans, b)

for a in al:
   if ans // a == ans / a:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))

Fixed submission:
import sys #追加
sys.setrecursionlimit(10**9)
import time
s = time.time()

n,m = map(int,input().split())
al = list(map(int,input().split()))

bl = [i//2 for i in al]
from fractions import gcd
ans = 1
for b in bl:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   ans = (ans * b) // gcd(ans, b)

for a in al:
   if time.time() - s > 1.9:
      print(0)
      import sys
      sys.exit()
   if ans % a == 0:
      print(0)
      import sys
      sys.exit()

def ceil(a, b):
   return a // b + (a % b > 0)

print(ceil(m // ans, 2))