Submission #598539

#TimeUsernameProblemLanguageResultExecution timeMemory
598539Valaki2Amusement Park (CEOI19_amusementpark)C++14
0 / 100
1 ms320 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long const ll mod = 998244353; void solve() { ll n, m; cin >> n >> m; if(n == 1) { cout << "0\n"; return; } ll ans = 1; for(ll i = 3; i <= n; i++) { ans = (ans * i) % mod; } ans = (ans * m) % mod; cout << ans << "\n"; } signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...