Submit | All submissions | Best solutions | Back to list |
VERODOOM - 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.
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 |
hide comments
2019-11-09 15:35:28
BigInteger is the key for JAVA users ;) |
|
2015-11-26 01:11:16
:) ----> your answer should be=62500000375000000500000000 |
|
2013-12-17 06:02:31 Gautam Goyal
have used java for solving, accepted but want to know how to multiply such big numbers in c |
|
2013-01-21 18:51:07 DivineAtheist
@:) The ans is...62500003750000050000000 for N = 50 |
|
2012-08-21 09:10:03 Aman Gupta
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 |
|
2012-03-12 22:41:36 Jiøí Kuèera
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. |
|
2012-03-11 10:57:55 Shizuo Heiwajima
Please explain the answer for input = 6 |