Given three integers x, y, and bound, return a list of all powerful integers whose value is less than or equal to bound.
An integer is considered powerful if it can be expressed as xy
The result may be returned in any order, and each value should appear at most once in the output.
Constraints:
x, y
bound
The key insight is that since xyx and y that remain within bound is at most x in an outer loop and powers of y in an inner loop, adding each sum x
Given three integers x, y, and bound, return a list of all powerful integers whose value is less than or equal to bound.
An integer is considered powerful if it can be expressed as xy
The result may be returned in any order, and each value should appear at most once in the output.
Constraints:
x, y
bound
The key insight is that since xyx and y that remain within bound is at most x in an outer loop and powers of y in an inner loop, adding each sum x