new file: P17088.cpp

This commit is contained in:
hanyixuanten
2026-07-11 22:59:36 +08:00
parent a6a8d0825e
commit d8b6eeb3fc
+25
View File
@@ -0,0 +1,25 @@
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n;
signed main()
{
scanf("%lld", &n);
int ans = 0;
for (int i = 0; i < n / 2; ++i)
{
ans <<= 1;
ans += 1;
}
for (int i = 0; i < n / 2; ++i)
{
ans <<= 1;
}
printf("%lld\n", ans);
return 0;
}
/*
5
00000
末尾0的个数等于1的个数
*/