-->
当前位置:首页 > 题库

PROGRAMMING:Monkeys eat peaches

Luz5年前 (2021-05-10)题库492
On the first day, the monkey picked some peaches and ate half of them immediately, but he didn't feel good and ate one more; The next morning, he ate half of the remaining peaches and another one. Every morning after that, I ate the half and one left from the previous day. When I wanted to eat again on the morning of the n (n < = 20) day, I saw that there was only one peach left. How many peaches did you pick on the first day.
###Input format:
There are several groups of test data, which are processed to the end of the file. Each group input days n.
###Output format:
Each group outputs the number of peaches picked on the first day.
###Input example:
Here is a set of inputs. For example:
```in
five
ten
eighteen
```
###Output example:
The corresponding output is given here. For example:
```out
forty-six
one thousand five hundred and thirty-four
three hundred and ninety-three thousand two hundred and fourteen
```







answer:If there is no answer, please comment