spoj#VERODOOM. Vero Dominoes
Vero Dominoes
Vero was one day playing some sort of game that consists in drinking a lot of orange juice, the game's idea is in turning up one domino piece and count the black dots in it, then, drink as many deciliters as the total count of the dots in the domino piece, for example, a 6-maximum-dots dominoes contains 168 dots in it.
She wants to know how much deciliters can be drank in one simple game, she doubts about your skills as a programmer, so she can test your program with over 150 thousands of cases.
INPUT:
The input will start with a T integer number, then, T lines will follow, for each T there will be a number N.
CONSTRAINTS:
1<=T<=150.000
0<=N<=50.000.000
OUTPUT:
For each number N you should output the total dots in the domino pieces...
SAMPLE INPUT:
2
6
1
SAMPLE OUTPUT:
168
3
Explanation of the second case:
There's only 1 dot maximum in the domino pieces, so you will count the piece 0 0, 0 1 and 1 1 (you should not count the 1 0 piece as it is represented with the 0 1 piece)
Constraints of the problem has been modified so the problem is a little bit challenging now.