Submission #19550525
Source Code Expand
Copy
#include <bits/stdc++.h> using namespace std; long long n, ans=1, mod=998244353, ert=1; void oszt(long long a) { long long p=mod-2; while (p) { if (p%2) { ans*=a, ans%=mod; } a*=a, a%=mod; p/=2; } } int main() { cin >> n; for (int i=1; i<=2*n; i++) { ert*=i, ert%=mod; if (i==2) { oszt(ert); } if (i==n) { oszt(ert), oszt(ert); } } cout << ans*ert%mod << "\n"; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Dodecagon |
User | peti1234 |
Language | C++ (GCC 9.2.1) |
Score | 500 |
Code Size | 543 Byte |
Status | AC |
Exec Time | 42 ms |
Memory | 3516 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 500 / 500 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, example0.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 42 ms | 3492 KB |
001.txt | AC | 3 ms | 3448 KB |
002.txt | AC | 5 ms | 3484 KB |
003.txt | AC | 31 ms | 3504 KB |
004.txt | AC | 39 ms | 3360 KB |
005.txt | AC | 4 ms | 3492 KB |
006.txt | AC | 2 ms | 3392 KB |
007.txt | AC | 4 ms | 3488 KB |
008.txt | AC | 35 ms | 3388 KB |
009.txt | AC | 34 ms | 3516 KB |
010.txt | AC | 2 ms | 3516 KB |
example0.txt | AC | 2 ms | 3392 KB |