[例1.10]猴子吃桃
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
一只小猴买了若干个桃子。第一天他刚好吃了这些桃子的一半,又贪嘴多吃了一个;接下来的每一天它都会吃剩余的桃子的一半外加一个。第 天早上起来一看,只剩下 个桃子了。请问小猴买了几个桃子?
输入格式
输入一个正整数 ,表示天数。
输出格式
输出小猴买了多少个桃子。
样例 #1
样例输入 #1
4
样例输出 #1
22
提示
数据保证,。
龙凤苑中学A班4.12
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2024-4-12 16:00
- End at
- 2024-4-16 16:00
- Duration
- 96 hour(s)
- Host
- Partic.
- 29