Problem Description
There is a youngster known for amateur propositions concerning several mathematical hard problems.

Nowadays, he is preparing a thought-provoking problem on a specific type of supercomputer which has ability to support calculations of integers between 0 and (2m−1)(inclusive).

As a young man born with ten fingers, he loves the powers of 10 so much, which results in his eccentricity that he always ranges integers he would like to use from 1 to 10k(inclusive).

For the sake of processing, all integers he would use possibly in this interesting problem ought to be as computable as this supercomputer could.

Given the positive integer m, your task is to determine maximum possible integer k that is suitable for the specific supercomputer.

 
Input
The input contains multiple test cases. Each test case in one line contains only one positive integer m, satisfying 1≤m≤105.
 
Output
For each test case, output "Case #x: y" in one line (without quotes), where x indicates the case number starting from 1 and y denotes the answer of corresponding case.
 
Sample Input
1
64
 
Sample Output
Case #1: 0
Case #2: 19
 
Source

题意:10^k能表示2^m-1,k有多大

解法:额..⌊mlog​10​​2⌋

 #include<bits/stdc++.h>
typedef long long LL;
typedef unsigned long long ULL;
using namespace std;
const int maxn=2e5+;
int main(){
long long n;
int num=;
while(cin>>n){
long long pos=(n*log10());
printf("Case #%d: ",num++);
cout<<pos<<endl;
}
return ;
}

2017 Multi-University Training Contest - Team 1 Add More Zero的更多相关文章

  1. 2017 Multi-University Training Contest - Team 1 1001&&HDU 6033 Add More Zero【签到题,数学,水】

    Add More Zero Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)T ...

  2. 2017 Multi-University Training Contest - Team 1 1003&&HDU 6035 Colorful Tree【树形dp】

    Colorful Tree Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)T ...

  3. 2017 Multi-University Training Contest - Team 1 03Colorful Tree

    地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6035 题面: Colorful Tree Time Limit: 6000/3000 MS ( ...

  4. 2017 Multi-University Training Contest - Team 9 1005&&HDU 6165 FFF at Valentine【强联通缩点+拓扑排序】

    FFF at Valentine Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) ...

  5. 2017 Multi-University Training Contest - Team 9 1004&&HDU 6164 Dying Light【数学+模拟】

    Dying Light Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Tot ...

  6. 2017 Multi-University Training Contest - Team 9 1003&&HDU 6163 CSGO【计算几何】

    CSGO Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Subm ...

  7. 2017 Multi-University Training Contest - Team 9 1002&&HDU 6162 Ch’s gift【树链部分+线段树】

    Ch’s gift Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total S ...

  8. 2017 Multi-University Training Contest - Team 9 1001&&HDU 6161 Big binary tree【树形dp+hash】

    Big binary tree Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)T ...

  9. 2017 Multi-University Training Contest - Team 1 1006&&HDU 6038 Function【DFS+数论】

    Function Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total ...

随机推荐

  1. CSS3学习笔记(2)—左右跳动的红心

    还在为无法表达内心澎湃的心情而着急吗?还在为制作跳动的心而烦恼吗?哈哈,今天我就把代码全部奉上,为你们追妹子添点贡献,下面来看最终的动态效果(事先说明一下:我用的截屏gif制作软件是绿色版的,所以gi ...

  2. bzoj5259: [Cerc2017]区间

    还是很强的一个题 ORZ肉丝哥哥 对于两个相交区间,假如他们两个都是可行的,那么他们的交也可行,不然没可能两边都把它缺的补上 那么对于答案区间,向右找到第一个可行区间右端点覆盖询问区间,就是最优的 考 ...

  3. 使用grunt js进行js的链接和压缩

    1,http://nodejs.org/download/ 安装nodejs 2,配置环境变量,将nodejs的安装目录放置在Path环境变量中 3,在cmd中 npm install -g grun ...

  4. java的一个爬虫

    进行抓取页面,我看了一下人家的教程,一般要用到htmlparser用来解析html得到一个网页的相关链接,用httpclient抓取网页数据, 下面是一我写的spider类 package com.o ...

  5. 字符编码乱码问题(servlet底层 编码大揭秘)

    好多初学者会遇到,请求过去的信息内包含中文(一般会是get方式提交过去的请求会出现).好郁闷,这是为什么呢.有下面分析下,说的不好可以吐槽 话说我们能遇到这种编码的问题,归根结底就是这  这 web开 ...

  6. html5--3.14 lable元素和label属性

    html5--3.14 lable元素和label属性 学习要点 掌握label元素的使用 掌握label属性的使用 lable元素 用来为 input 元素定义标注(标记),建立一个与之相关联的标签 ...

  7. Swift类和结构体

    在C++中,相信不会有太多人去详细考究结构体和类的区别,因为二者关系实在不大.但在Swift中,结构体和类的关系非常大,它们的组成部分都包括:初始化器.实例方法.实例属性.类型属性.类型方法等等:二者 ...

  8. ab-如何提交post请求

    ab -n 1 -c 1 -p post.txt http://***********/ 文件post.txt中存放要post的数据

  9. fragment error

    error:   android.view.InflateException: Binary XML file line #6: Error inflating class fragment 解决办法 ...

  10. PTA 哈希查找 除留取余法

    PTA 电话聊天狂人(25 分) 给定大量手机用户通话记录,找出其中通话次数最多的聊天狂人. 输入格式: 输入首先给出正整数N(≤10​5​​),为通话记录条数.随后N行,每行给出一条通话记录.简单起 ...