题解:P15708 [JAG 2023 Summer Camp #2] Umbrella Queries
afo_subway · · 题解
解题思路:
当
当
代码:
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
if (n % 2)
{
cout << 0 << endl;
}
else cout << (n * (n - 2)) / 2 << endl;
}
return 0;
}