mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-10 02:58:48 +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…
Reference in New Issue
Block a user