Brute Force(暴力)
class Solution(object): def powerfulIntegers(self, x, y, bound): """ :type x: int :type y: int :type bound: int :rtype: List[int] """ ans=[] for i in range(20): for j in range(20): a=x**i+y**j if a<=bound: ans.append(a) return list(set(ans))