DHPC '131

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

8/25/13

DHPC '13

DHPC '13
Below is a list of available problems for you to solve.
AVAILABLE PROBLEMS

Joker's Bait Attem pted MINESWEEPER Attem pted FIERY DILEMMA Attem pted Everything that glitters Factor's Maze Power function Attem pted Enigma chequered Factor's maze 2.0 Joker's game

Joker's Bait
Bruce wayne has finally picked up the trail to Joker's den. He is leaving cards in increasing numbers. But there's a strange pattern in the quantity of cards found. Each time the number increases by a constant value. Maybe its a trap for Batman. Only time will tell. You have to help Batman out by adding the number of the cards.

Input
The first line contains the number of test cases (t<1000). Then t test cases follow. Each test case consists of one line containing three numbers a, d and n (a,d,n <= 10^6).

Output
For each test case, print out one line containing one number which is the sum of the respective A.P.

Example
Input

3 232 323 425

Output
7 15 40 ###time limit - 1sec

Solve

29

have solved the problem.

172.16.100.111/dhpc/index.php?id=3

1/2

8/25/13

DHPC '13

Pow ered by Codejudge.

172.16.100.111/dhpc/index.php?id=3

2/2

You might also like