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

PROGRAMMING:The problem of monkeys eating peaches

Luz5年前 (2021-05-10)题库400
A monkey picked several peaches on the first day, ate half of them immediately, and then ate one more; The next morning, he ate half of the remaining peaches and another one. After that, every morning I ate the remaining half of the previous day plus one. When I wanted to eat again in the morning, I saw that there was only one peach left. Q: how many peaches were picked on the first day?
###Input format:
Input gives a positive integer $$n $$($$1 < n / Le 10 $$) in one line.
###Output format:
Output the number of peaches picked on the first day in a row.
###Input example:
```in
three
```
###Output example:
```out
ten
```






answer:If there is no answer, please comment