Horje
Marin and Anti-coprime Permutation codeforces solution in c++ Code Example
Marin and Anti-coprime Permutation codeforces solution in c++
#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 << "\n";
	}
	else
	{
		ll sum = 1;
		for (int i = 1; i <= n / 2; i++)
		{
			sum = (i * sum) % 998244353;
			
		}
		
		sum *= sum;
		
		cout << sum % 998244353 << "\n";
	}
}
 
int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		solve();
	}
	return 0;
}




Cpp

Related
walk filesystem in c++ Code Example walk filesystem in c++ Code Example
amusia Code Example amusia Code Example
all in one c++ Code Example all in one c++ Code Example
C++ Converting Celsius to Kelvin Code Example C++ Converting Celsius to Kelvin Code Example
c++ compile to msi Code Example c++ compile to msi Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10