QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#404860 | #6736. Alice and Bob | 20232501479 | WA | 0ms | 3604kb | C++14 | 332b | 2024-05-04 20:44:44 | 2024-05-04 20:44:45 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int P=998244353;
int f[10010000],n;
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cin>>n;
f[0]=1;
f[1]=1;
for(int i=1;i<=n+1;i++)
f[i]=f[i-1]*i%P;
cout<<f[n+1]/(n*max((n/2-1),(int)(2)))<<endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3548kb
input:
1
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
2
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
10
output:
997920
result:
ok 1 number(s): "997920"
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3604kb
input:
100
output:
116549
result:
wrong answer 1st numbers differ - expected: '188898954', found: '116549'