QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#404860#6736. Alice and Bob20232501479WA 0ms3604kbC++14332b2024-05-04 20:44:442024-05-04 20:44:45

Judging History

你现在查看的是最新测评结果

  • [2024-05-04 20:44:45]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3604kb
  • [2024-05-04 20:44:44]
  • 提交

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'