Олимпиадный тренинг

Задача 6004. Filling an array


The first line contains a non-negative number N, the number of array elements (N<=100)
The second line contains two numbers: number A - the value of the first element of the array, number p - the difference between the next and previous element of the array (arithmetic progression)
Fill the array with the elements of the given progression and display it on the screen

Sample input and output
Test number Input Output
1 5
7 3
7 10 13 16 19