标签:def return lin pen obj sel color solution style
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))
Leetcode 970. Powerful Integers
标签:def return lin pen obj sel color solution style
原文地址:https://www.cnblogs.com/zywscq/p/10540582.html