Dalao Help me!
查看原帖
Dalao Help me!
977778
__Harry_Haiyun__楼主2023/9/9 15:45
#include <bits/stdc++.h>
#define int long long
#define iostream() ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
using namespace std;
const int maxn = 1e6+7;
const int MAXN = maxn / 2;
int f(int n)
{
	if (!n) return 0;
	else if (n == 1) return 1;
	else return pow(2,n) - 1;
}
signed main()
{
    iostream();
    int n;
    cin >> n;
    cout << f(n);
 	return 0;
}
2023/9/9 15:45
加载中...