Project Euler 29 - Distinct powers

Official link: https://projecteuler.net/problem=29

Thought Process

Initialise a set (to remove duplicates), make a double loop through a and b and add a^b to the set, then I return the length of the set

Interactive Code

Input an odd integer (yourinput)

Code will output the number of distinct terms generated by a^b where 2 <= a, b <= yourinput