Wednesday, November 14, 2018

problem 9

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: 

Sample Output 1: 
0 6 10 17 22 30 36 

Sample Input 2: 

Sample Output 2: 
0 6 10 17 22

No comments:

 DBMS class materials click here to join the class room  click here  https://www.youtube.com/channel/UC93Sqlk_tv9A9cFv-QjZFAQ