fork(1) download
  1. # your code goes here
  2. n=int(input())
  3. c=1
  4. for i in range(1,n+1):
  5. for j in range(1,i+1):
  6. print(c,end=" ")
  7. c=c+1
  8. print("\n")
Success #stdin #stdout 0.07s 14156KB
stdin
5
stdout
1 

2 3 

4 5 6 

7 8 9 10 

11 12 13 14 15