'''
distinct terms in the sequence generated by a**b for 2 ≤ a ≤ 100 and 2 ≤ b ≤ 100?
'''
def distinct_powers(number):
    my_set = set()
    for a in range(2, number + 1):
        for b in range(2, number + 1):
            my_set.add(a ** b)
    # print(sorted(my_set))
    print("len = ", len(my_set))


import time      # get a sense of the time taken
t = time.time()  # get time just before the main routine

########## the main routine #############

distinct_powers(100)

########## end of main routine ###########

t = time.time() - t  # and now, after the routine
print("time       = {:7.5f} s\t{:7.5f} ms\t{:7.3f} µs".format(t, t * 1000, t*1_000_000))
