VERODOOM - Vero Dominoes

no tags 

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.


hide comments
tarun_28: 2019-11-09 15:35:28

BigInteger is the key for JAVA users ;)

rayhan50001: 2015-11-26 01:11:16

:) ----> your answer should be=62500000375000000500000000

Gautam Goyal: 2013-12-17 06:02:31

have used java for solving, accepted but want to know how to multiply such big numbers in c

DivineAtheist: 2013-01-21 18:51:07

@:) The ans is...62500003750000050000000 for N = 50

Aman Gupta: 2012-08-21 09:10:03

the power of Python :)

:): 2012-06-23 14:38:39

what is the answer for n=500000000
i am getting 62500003750000050831360
is it right?getting WA

Last edit: 2012-06-23 14:39:18
Jiøí Kuèera: 2012-03-12 22:41:36

Imagine all the possible domino pieces that have from 0 to 6 dots. Draw them and then count how many dots you needed to draw all of them.

Shizuo Heiwajima: 2012-03-11 10:57:55

Please explain the answer for input = 6


Added by:david_8k
Date:2012-03-08
Time limit:2.223s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Own Problem