HDU 5587 Array
来源:互联网 发布:sql属于什么数据库语言 编辑:程序博客网 时间:2024/06/13 23:51
Array
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 330 Accepted Submission(s): 163
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.
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.(1≤T≤2∗103)
Next T line contains, each line contains one interger M.(1≤M≤1016)
First line contains a single integer T, means the number of test cases.
Next T line contains, each line contains one interger M.
Output
For each test case,output the answer in a line.
Sample Input
3135
Sample Output
147
Source
BestCoder Round #64 (div.2)
一开始他拥有一个数列{1}。每过一天,他将他当天的数列复制一遍,放在数列尾,并在两个数列间用0隔开。Vicky想做些改变,于是他将当天新产生的所有数字(包括0)全加1。Vicky现在想考考你,经过100天后,这个数列的前M项和是多少?。
0 0
- HDU 5587 Array
- HDU 5587(Array-BigInteger)
- HDU 5587:Array
- hdu 5587 Array
- HDU 5587 Array
- HDU 5587 Array
- HDU 5587 Array
- hdu 5587 (Array)
- HDU-5587 Array(DFS)
- HDU 5587 Array (规律)
- HDU 5587 Array(递归)
- hdu 5587 Array(高效)
- HDU 5587 Array 规律+递归
- hdu 6197 array array array
- HDU 6197 array array array
- HDU-Array
- hdu 5587 Array 2015.11.28 bestcoder 1003
- HDU 5587 Array (找规律_二分)
- VS2012新建项目出现问题“未找到与约束...”已解决
- sql
- Android中使用Movie显示gif动态图
- 数据结构基础7.6:表排序
- jsp中引入外部js文件时需要注意的关键点
- HDU 5587 Array
- mysql优化方案
- Callback机制在Android中的应用场景
- 工业4.0时代,怎样为孩子筹备未来的教育
- 轻松学习JavaScript八:JavaScript函数
- 《统计学习方法》学习笔记(四)——朴素贝叶斯法
- 那些坑了我N多时间的问题(持续更新)
- ListView多选滚动问题
- Ubuntu系统 SLAM 操作环境搭建