Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> def HCF(a, b):

   while b != 0:

       a, b = b, a % b

   return a





nums = []





def calc():

    

    nums = []

    for i in range (5):

        nums.append(int(input()))

       

    nums.sort()



    possible_multiples = []



    for i in range (4):

        dif = nums[i+1]-nums[i]

        possible_multiples.append(dif)





    possible_multiples.sort()

    multiples = []

    for i in range(4):

        multiples.append(HCF(possible_multiples[0], possible_multiples[i]))

    multiples.sort()

    print(multiples)

    print("It's the", multiples[0], "times table")

    shift = nums[0]%multiples[0]

    print("The shift is " , shift)



calc()
