# n(n+1) over 2

Write a python program with a time complexity of `f(n) = (n*(n+1))/2`

and class `O(n^2)`

```
1 for i in range(n):
2 for j in range(0, i):
3 print(i)
```

Write a python program with a time complexity of `f(n) = (n*(n+1))/2`

and class `O(n^2)`

```
1 for i in range(n):
2 for j in range(0, i):
3 print(i)
```