Hide

Problem E
Triangular Numbers

Accepted submissions to this problem will be granted a score of 100

The i-th triangular number is the sum of the integers from 1 to i, inclusive. Write a program that, given an integer n, prints the first n triangular numbers.

Input

Input consists of one line containing the integer n, where 0n1000.

Output

Output consists of n lines, where the i-th line contains the i-th triangular number.

Sample Input 1 Sample Output 1
1
1
Sample Input 2 Sample Output 2
5
1
3
6
10
15
Sample Input 3 Sample Output 3
8
1
3
6
10
15
21
28
36
Sample Input 4 Sample Output 4
0
Sample Input 5 Sample Output 5
15
1
3
6
10
15
21
28
36
45
55
66
78
91
105
120
Hide

Please log in to submit a solution to this problem

Log in