## Story

John runs a shop, bought some goods, and then sells them. He used a special accounting method, like this:
```
[[60,20],[60,-20]]
```
Each sub array records the commodity price and profit/loss to sell (percentage). Positive mean profit and negative means loss.

In the example above, John's first commodity sold at a price of $60, he made a profit of 20%; Second commodities are sold at a price of $60 too, but he lost 20%.

Please calculate, whether his account is profit or loss in the end?
    
## Rules

Write a function ```profitLoss```, argument ```records``` is the list of sales.

return a number(positive or negative), round to two decimal places.
    

## Examples

Source: codewars | Difficulty: EASY
Tags: Game theory

Ad-hoc

Starter code: def profitLoss(records):
	

Solutions:
def profitLoss(records):
	return round(sum((price - price / (1 + profit / 100) for (price, profit) in records)), 2)


def profitLoss(records):
	return round(sum((pr * pe / (100 + pe) for (pr, pe) in records)), 2)


def profitLoss(records):
	return round(sum((amount * (1 - 1 / (1 + perc / 100)) for (amount, perc) in records)), 2)


def profitLoss(records):
	return round(sum((price * percent / (100 + percent) for (price, percent) in records)), 2)


def profitLoss(records):
	return round(sum((x * p / (100 + p) for (x, p) in records)), 2)


profitLoss = lambda a: round(sum((p * l / (l + 100) for (p, l) in a)), 2)


def profitLoss(r):
	return round(sum((i[0] - i[0] * 100.0 / (100 + i[1]) for i in r)), 2)


def profitLoss(records):
	return round(sum([r - r / (1 + p / 100) for (r, p) in records]), 2)


def profitLoss(records):
	return round(100 * sum((c[0] - c[0] / (1 + c[1] / 100) for c in records))) / 100


def profitLoss(records):
	return round(sum(map(lambda r: r[0] * r[1] / (100 + r[1]), records)), 2)