作业帮 > 英语 > 作业

英语翻译Once Ivanushka was lying on the stove as usually and med

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/04/20 00:15:12
英语翻译
Once Ivanushka was lying on the stove as usually and meditating.And he came up with an idea:he should buy a fridge.So he bought a fridge and placed it near the stove.But the fridge was unsteady,because the floor in the house was wooden.Ivanushka found a way out.He decided to put something under a leg of the fridge so that it would become steady.
Ivanushka took a 1 cm wide and n cm long paper strip and started to fold it so as to obtain a paper square with a side of 1 cm consisting of n layers.It is exactly this thickness that was needed to make the fridge steady.Ivanushka folds the strip according to the following algorithm:he applies a ruler to measure off a whole number of centimeters from the left edge of the strip and folds the left part to the right (as a result,the left edge shifts to the right by the measured number of centimeters).Then he again measures off some number of centimeters from the new left edge and folds them to the right.He repeats this operation until the strip becomes 1 cm long.
Determine the minimal number of foldings Ivanushka has to do.
Input
You are given the integer n (1 ≤ n ≤ 109).
Output
In the first line output the minimal number of paper foldings necessary to obtain the required number of layers.In the second line output the sequence of lengths in centimeters that Ivanushka measured off before each folding.Separate the numbers with a space.
一天Ivanushka像往常一样躺在炉子旁边.他想出了一个主意:他应该买一个电冰箱.于是,他买了冰箱放在炉子附近.但是,冰箱是不稳定的,因为在家里地板是木制的.Ivanushka找到一条出路.他决定把冰箱下面支起条腿,使它变得稳定.
Ivanushka了一个1厘米宽和N厘米长的纸条,并开始将它折叠,以获得具有1厘米的N层组成的方一纸包.正是有了这种需要,使冰箱的稳定厚度.Ivanushka折条根据下面的算法:他申请尺子量出从加沙地带的左边缘一厘米的整数部分和褶皱左到右(作为结果,左边的向右移动测量的厘米数).然后,他又了一些措施,从厘米的新左派边数和褶皱他们的权利.他重复此操作,直到条变为1厘米长.
确定皱褶Ivanushka必须做的最小数量.
输入
您将得到整数n(1≤n时≤109).
输出
在第一行输出的纸张皱褶必要的最小数量以获得所需数量的图层.在第二行输出以厘米长的序列,Ivanushka量出在每次折叠.用空格隔开的数字.