| UTPC Contest 12-01-23 Div. 2 (Beginner) |
|---|
| Закончено |
In a small bakery, a baker is famous for his unique baklava that consists of multiple layers. Each layer of the baklava can have a different thickness. The baker, being a perfectionist, wants the thickness of each layer to be perfect. He has a rule: the thickness of each layer should be exactly 1 unit thicker than the previous layer.
Given the thickness of the first layer and the total number of layers, your task is to calculate the total thickness of the baklava.
The first line contains a single integer $$$T (1 \leq T \leq 100$$$), the number of baklava that the baker is preparing.
Each of the next $$$T$$$ lines contains two integers $$$L$$$ and $$$N$$$ ($$$1 \leq L, N \leq 1000$$$), where $$$L$$$ is the thickness of the first layer, and $$$N$$$ is the total number of layers.
For each test case, output a single line containing one integer — the total thickness of the baklava.
3 1 3 5 1 8 8
6 5 92
| Название |
|---|


