Have a look at the following numbers.

```
 n | score
---+-------
 1 |  50
 2 |  150
 3 |  300
 4 |  500
 5 |  750
```

Can you find a pattern in it? If so, then write a function `getScore(n)`/`get_score(n)`/`GetScore(n)` which returns the score for any positive number `n`:

```c++
int getScore(1) = return 50;
int getScore(2) = return 150;
int getScore(3) = return 300;
int getScore(4) = return 500;
int getScore(5) = return 750;
```

Source: codewars | Difficulty: EASY
Tags: Mathematics

Ad-hoc

Starter code: def get_score(n):
	

Solutions:
def get_score(n):
	return n * (n + 1) * 25


def get_score(n):
	return 50 * (n * (n + 1)) / 2


get_score = lambda n: 25 * n * (n + 1)


get_score = lambda n, a=0: sum((a + i * 50 for i in range(n + 1)))


def get_score(n):
	return sum([x * 50 for x in range(n + 1)])


def get_score(n):
	return (1 + (1 << 1 << 1)) ** (1 << 1) * n * (n + 1)


get_score = lambda n: 25 * n * -~n