BZOJ 1192 鬼谷子的钱袋 (二进制思想)

题解:鉴于二进制的思想来划分

#include <cstdio>
int main(){
    int n,d=0;scanf("%d",&n);
    while(1<<d<=n)d++;
    printf("%d
",d);
}
原文地址:https://www.cnblogs.com/forever97/p/bzoj1192.html