QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#289059 | #5817. 小学生数学题 | allen2010y | 0 | 77ms | 3648kb | C++14 | 389b | 2023-12-23 15:03:06 | 2023-12-23 15:03:06 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int mod=998244353;
int fspow(int a,int n)
{
int ans=a;
while(n)
{
ans*=ans;
ans%=mod;
if(n&1) n--,ans*=a,ans%=mod;
n>>=1;
}
return ans;
}
int main()
{
long long n,k,ans=0,last=1;
cin>>n>>k;
for(int i=2;i<=n-1;i++)
{
last*=i;
last%=mod;
ans+=last;
ans%=mod;
}
cout<<ans;
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 37ms
memory: 3632kb
input:
9450395 1
output:
688545436
result:
wrong answer 1st lines differ - expected: '688545438', found: '688545436'
Test #2:
score: 0
Wrong Answer
time: 35ms
memory: 3596kb
input:
8978812 1
output:
334565354
result:
wrong answer 1st lines differ - expected: '334565356', found: '334565354'
Test #3:
score: 0
Wrong Answer
time: 35ms
memory: 3648kb
input:
8944235 1
output:
982802913
result:
wrong answer 1st lines differ - expected: '982802915', found: '982802913'
Test #4:
score: 0
Wrong Answer
time: 28ms
memory: 3468kb
input:
7081118 3
output:
856241749
result:
wrong answer 1st lines differ - expected: '599009773', found: '856241749'
Test #5:
score: 0
Wrong Answer
time: 31ms
memory: 3540kb
input:
7904241 3
output:
209857164
result:
wrong answer 1st lines differ - expected: '871243720', found: '209857164'
Test #6:
score: 0
Wrong Answer
time: 39ms
memory: 3472kb
input:
9921275 3
output:
307807178
result:
wrong answer 1st lines differ - expected: '549818101', found: '307807178'
Test #7:
score: 0
Wrong Answer
time: 68ms
memory: 3508kb
input:
17575748 14135489
output:
733367862
result:
wrong answer 1st lines differ - expected: '69236780', found: '733367862'
Test #8:
score: 0
Wrong Answer
time: 77ms
memory: 3632kb
input:
19858362 14822524
output:
856686889
result:
wrong answer 1st lines differ - expected: '239890381', found: '856686889'
Test #9:
score: 0
Wrong Answer
time: 73ms
memory: 3576kb
input:
18848696 15530895
output:
266059227
result:
wrong answer 1st lines differ - expected: '88125041', found: '266059227'
Test #10:
score: 0
Wrong Answer
time: 69ms
memory: 3648kb
input:
17787945 13890407
output:
582771671
result:
wrong answer 1st lines differ - expected: '989967864', found: '582771671'