#include<iostream>
#include<algorithm>
#include<cmath>
#include<ctime>
#include<vector>
#define ll long long
using namespace std;
void solve()
{
//B. Marin and Anti-coprime Permutation
ll n;
cin >> n;
if (n % 2 ==1)
{
cout << 0 << "
";
}
else
{
ll sum = 1;
for (int i = 1; i <= n / 2; i++)
{
sum = (i * sum) % 998244353;
}
sum *= sum;
cout << sum % 998244353 << "
";
}
}
int main()
{
int t;
cin >> t;
while (t--)
{
solve();
}
return 0;
}
Code Example |
---|
Cpp :: c++ to c converter |
Cpp :: what is the format specifier for dword c++ |
Cpp :: initializer before void c++ |
Cpp :: c++ arreglo/array |
Cpp :: inversed priority queue |
Cpp :: how to make negative number positive in c++ |
Cpp :: c++ suare |
Cpp :: how to call subclass override method in c++ |
Cpp :: Max / Min Stack in c++ using stl in O(1) time and space |
Cpp :: c++ max and min of vector |
Cpp :: c++ find in pair |
Cpp :: priority queue using heap |
Cpp :: palindrome string |
Cpp :: while loop c++ |
Cpp :: c vs c++ vs c# |
Cpp :: c++ handling |
Cpp :: sinonimo de tratar |
C :: c colourful output |
C :: c distance between 2 points |
C :: wireless app debug android |
C :: convert string to float c |
C :: octave sum all elements in matrix |
C :: windeployqt example |
C :: execute maven project in cmd |
C :: c iterate string |
C :: copy string c |
C :: union in c |
C :: c string |
C :: copy string in c |
C :: c recursion func revers number |