K.Selection
签到题,直接交吧。
题目描述
There are nn vegetable-birds and LHR wants to kick their ass many times.
In each round, LHR can select several unique vegetable-birds and kick their ass.
To be fair, LHR should follow 22 principles:
At the end of all rounds, each vegetable-birds should be kicked the same number of times
The same vegetable-birds combination cannot appear in any two rounds
LHR wants to know how many rounds he can do at most, can you help him?
输入格式
The input only has an integer nn meaning the number of vegetable-birds.
1<=n<=50.
输出格式
Output an integer to indicate the maximum number of rounds that LHR can perform.
输入输出样例
输入 #1
1
输出 #1
1
输入 #2
2
输出 #2
3
说明/提示
In example 22, there are 22 vegetable-birds.
At round 11, LHR can kick the 1st vegetable-bird.
At round 22, LHR can kick the 2nd vegetable-bird.
At round 33, LHR can kick the 1st vegetable-bird and the 2nd vegetable-bird.
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
int n;
cin>>n;
ll m=pow(2,n)-1;//不要忘记开long long
cout<<m<<endl;
return 0;
}