EasyRating 1000
Last Stone Values
A trail starts at 0. Each of the next n − 1 stones is either a or b more than the previous one. Print every possible value of the last stone, in increasing order.
Input
Three integers n, a, b.
Output
The values.
Sample 1
Input
3 1 2
Output
2 3 4
Sample 2
Input
4 10 100
Output
30 120 210 300
Output appears here