Solve the programming task below in a Python markdown code block.
Consider the number triangle below, in which each number is equal to the number above plus the number to the left. If there is no number above, assume it's a `0`.

The triangle has `5` rows and the sum of the last row is `sum([1,4,9,14,14]) = 42`.

You will be given an integer `n` and your task will be to return the sum of the last row of a triangle of `n` rows. 

In the example above:
More examples in test cases. Good luck!

```if:javascript
### Note

This kata uses native arbitrary precision integer numbers ( `BigInt`, `1n` ).  
Unfortunately, the testing framework and even native `JSON` do not fully support them yet.  
`console.log(1n)` and `(1n).toString()` work and can be used for debugging.  

We apologise for the inconvenience.
```
Also feel free to reuse/extend the following starter code:
```python
def solve(n):
```