• + 1 comment
    import math
    import os
    import random
    import re
    import sys
    from functools import reduce
            
        
                            
    
    if __name__ == '__main__':
        first_multiple_input = input().rstrip().split()
    
        n = int(first_multiple_input[0])
    
        k = int(first_multiple_input[1])
    
        A = list(map(int, input().rstrip().split()))
        x=reduce(lambda a,b: math.gcd(a,b),A)
        t=2
        while t<=math.trunc(x**0.5):
            if x%t==0:
                break
            else:
                t+=1
        print(t*(k//t)) if t<=math.trunc(x**0.5) else print(x*(k//x))