Search
 
SCRIPT & CODE EXAMPLE
 

CPP

factorial MOD 998244353

#include <bits/stdc++.h>
using namespace std;

const int MOD = 998244353;

void solve() {
    int n; cin >> n;
    if (n & 1) {
        cout << "0
";
        return;
    }
    long long ans = 1;
    for (int i = 1; i <= n ; ++i) {
        ans *= 1LL * i * i % MOD;
        ans %= MOD;
    }
    cout << ans << '
';
}

Comment

PREVIOUS NEXT
Code Example
Cpp :: vector übergeben c++ 
Cpp :: c++ language 
Cpp :: cpp full form 
Cpp :: how to fixed how many digit will be after point in c++ 
Cpp :: arrays to function c++ 
Cpp :: thread group c++ 
Cpp :: c++ format number thousands separator 
Cpp :: get player pawn 
Cpp :: infix to prefix using cpp linked list program 
Cpp :: bitmap rotate 90 deg 
Cpp :: MPI_File_seek 
Cpp :: how to get the last digit of a number 
Cpp :: typeid to string c++ 
Cpp :: c++ sort a 2d vector by column 
Cpp :: c++ login 
Cpp :: inverse lerp c++ 
Cpp :: what is c++ function 
Cpp :: 18 in 12 hour time 
Cpp :: how to tokenize a string in c++ 
Cpp :: constructor overloading in c++ 
Cpp :: pre increment vs post increment c++ 
Cpp :: sinonimo de tratar 
C :: C bold output 
C :: conio.h linux 
C :: div en langage c 
C :: vowel or consonant in c 
C :: is it possible to access argv in function 
C :: write a program in c to check whether the number is armstrong or not 
C :: arduino millis() 
C :: get last char string c 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =