|
|
back to boardwhat is test 6????? Please Heeeeelp!!! I can't find mistake, help!! #include <iostream> #include <cmath> using namespace std; int main() { __int64 n,k; int s = 0; cin>>n>>k; int step; step = log(k)/log(2); if(n-pow(2,step+1)>=0) { n -= pow(2,step+1); s = (step+1)+ceil(n*1./k); } else { s = ceil(log(n)/log(2)); } cout<<s; } |
|
|