mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2025-01-26 01:40:08 +00:00
P5743 【深基7.习8】猴子吃桃
R38781374
This commit is contained in:
parent
b746c74481
commit
70cc61de43
17
problem/P5743/P5743.cpp
Normal file
17
problem/P5743/P5743.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// R38781374
|
||||||
|
|
||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int n, sum;
|
||||||
|
sum = 1;
|
||||||
|
cin >> n;
|
||||||
|
for (int i = n-1; i > 0; i--) {
|
||||||
|
sum++;
|
||||||
|
sum *= 2;
|
||||||
|
}
|
||||||
|
cout << sum;
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user