Plants under shade
There are certain plants that needs to be grown under the shade of huge trees and the dead leaves from the trees become the natural manure for the plants. So willow trees are planted throughout the village at certain positions.
The position(distance from the first tree) follows the following series
0 6 10 17 22 30 36....
Input format:
Input is an integer which corresponds to number of willow trees, n.
Output format:
Output is the series that contains 'n' numbers.
Sample Input 1:
7
Sample Output 1:
0 6 10 17 22 30 36
Sample Input 2:
5
Sample Output 2:
0 6 10 17 22
No comments:
Post a Comment