1. You are given three numbers A, B, and X. 2. You have to print all-powerful numbers that have value less than or equal to X. 3. A number is powerful if it is equal to x^i + y^j for i >= 0 and j >= 0.
1 <= A,B <= 100 1 <= X <= 10^6
Three numbers A, B, and X.
Space-separated integers representing powerful numbers.