【2017 Multi-University Training Contest - Team 1 1001】Add More Zero
让你求最大的k;
使得
10^k<=2^m-1
求出2^m-1的位数就好;
[lg(2^m-1)] = lg(2^m) = m*lg2
1(没加case)
#include <bits/stdc++.h>
using namespace std;
int n;
int main(){
int kk = 0;
while (~scanf("%d",&n)){
kk++;
int temp = n*log10(2);
printf("Case #%d: %d\n",kk,temp);
}
return 0;
}