QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#289059#5817. 小学生数学题allen2010y0 77ms3648kbC++14389b2023-12-23 15:03:062023-12-23 15:03:06

Judging History

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

  • [2023-12-23 15:03:06]
  • 评测
  • 测评结果:0
  • 用时:77ms
  • 内存:3648kb
  • [2023-12-23 15:03:06]
  • 提交

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'