package leetcode;

import java.util.List;

/**
 * https://leetcode.com/problems/powerful-integers/
 */
public class Problem970 {
    public List<Integer> powerfulIntegers(int x, int y, int bound) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem970 prob = new Problem970();
    }
}

@@ -33,13 +33,89 @@
 til.
+Array
 List;
+%0Aimport java.util.HashSet;%0Aimport java.util.List;%0Aimport java.util.Set;
 %0A%0A/*
@@ -279,130 +279,512 @@
     
-// TODO%0A        return null;%0A
+Set%3CInteger%3E set = new HashSet%3C%3E();%0A        for (int i = 0; i %3C= bound; i++) %7B%0A  
     
-%7D%0A%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem970 prob = new Problem970(
+  int a = (int) Math.pow(x, i);%0A            if (a %3E bound) %7B%0A                break;%0A            %7D%0A            for (int j = 0; j %3C= bound; j++) %7B%0A                int b = (int) Math.pow(y, j);%0A                int c = a + b;%0A                if (c %3E bound) %7B%0A                    break;%0A                %7D else %7B%0A                    set.add(c);%0A                %7D%0A            %7D%0A        %7D%0A        return new ArrayList%3C%3E(set
 );%0A 

Solve problem 970