Given an integer
The first line of input is an integer
In the example, the given starting number is
10, and the number of rows in the pyramid is 5.
n = int(input())
k = int(input())
for r in range(k):
print(*[n + i for i in range(r + 1)])
n += r + 1
Comments
Leave a comment