F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Array

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 1007    Accepted Submission(s): 484


Problem Description
Vicky is a magician who loves math. She has great power in copying and creating.
One day she gets an array {1}ĄŁ After that, every day she copies all the numbers in the arrays she has, and puts them into the tail of the array, with a signle '0' to separat.
Vicky wants to make difference. So every number which is made today (include the 0) will be plused by one.
Vicky wonders after 100 days, what is the sum of the first M numbers.
 

Input
There are multiple test cases.
First line contains a single integer T, means the number of test cases.$\left( 1 \leq T \leq 2 * {10}^{3} \right)$
Next T line contains, each line contains one interger M. $\left( 1\leq M \leq {10}^{16} \right)$
 

Output
For each test case,output the answer in a line.
 

Sample Input
3 1 3 5
 

Sample Output
1 4 7
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-10-05 04:23:22, Gzip enabled