HDU-6033 Add More Zero
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
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
#include<iostream> #include<math.h> #define LG 0.30102999566 using namespace std; int main() { int a; double m; a=1; while(cin>>m) { cout<<"Case #"<<a++<<": "; cout<<(int)(m*LG)<<endl; } }
HDU-6033 Add More Zero