本帖最后由 ylca 于 2016-7-2 04:06 编辑
Integer orHeight = 8848*1000;//实际高度
Integer tempHeight = 1;//纸张厚度
int number = 0;
while (orHeight>tempHeight) {
//折叠
tempHeight =tempHeight*2;
number++;
}
System.out.println("折叠次数:"+number);
System.out.println("折叠高度:"+tempHeight/1000);
|
|