如果是脑筋急转弯的话答案应该是9次。。。
不管什么纸,叠9次以后就不可能再叠加了
或者
while(length<88481300)
{
i++;
length = length * 2;
}
#include
int main()
{
double heigh = 8848.13;
double paper = 0.1;
heigh = 1000*heigh;
int n =0;
while(1)
{
paper = paper*2;
n++;
if (paper>=heigh)
{
break;
}
}
printf(" %d",n);
return 0;
}
//---------------------------------------------------------------------------
#include
int tot(long int n)
{
int ct=1;
while (n<88481300)
{
n*=2;
++ct;
}
return ct;
}
int main(int argc, char* argv[])
{
printf("%d",tot(1));
return 0;
}
//---------------------------------------------------------------------------