QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#289055#5817. 小学生数学题allen2010y0 56ms3552kbC++14375b2023-12-23 15:02:272023-12-23 15:02:28

Judging History

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

  • [2023-12-23 15:02:28]
  • 评测
  • 测评结果:0
  • 用时:56ms
  • 内存:3552kb
  • [2023-12-23 15:02:27]
  • 提交

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;
		ans+=last;
		ans%=mod;
	}
	cout<<ans;
	return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 25ms
memory: 3552kb

input:

9450395 1

output:

622996031

result:

wrong answer 1st lines differ - expected: '688545438', found: '622996031'

Test #2:

score: 0
Wrong Answer
time: 27ms
memory: 3360kb

input:

8978812 1

output:

622996031

result:

wrong answer 1st lines differ - expected: '334565356', found: '622996031'

Test #3:

score: 0
Wrong Answer
time: 27ms
memory: 3428kb

input:

8944235 1

output:

622996031

result:

wrong answer 1st lines differ - expected: '982802915', found: '622996031'

Test #4:

score: 0
Wrong Answer
time: 21ms
memory: 3368kb

input:

7081118 3

output:

622996031

result:

wrong answer 1st lines differ - expected: '599009773', found: '622996031'

Test #5:

score: 0
Wrong Answer
time: 24ms
memory: 3368kb

input:

7904241 3

output:

622996031

result:

wrong answer 1st lines differ - expected: '871243720', found: '622996031'

Test #6:

score: 0
Wrong Answer
time: 30ms
memory: 3480kb

input:

9921275 3

output:

622996031

result:

wrong answer 1st lines differ - expected: '549818101', found: '622996031'

Test #7:

score: 0
Wrong Answer
time: 52ms
memory: 3308kb

input:

17575748 14135489

output:

622996031

result:

wrong answer 1st lines differ - expected: '69236780', found: '622996031'

Test #8:

score: 0
Wrong Answer
time: 55ms
memory: 3472kb

input:

19858362 14822524

output:

622996031

result:

wrong answer 1st lines differ - expected: '239890381', found: '622996031'

Test #9:

score: 0
Wrong Answer
time: 56ms
memory: 3472kb

input:

18848696 15530895

output:

622996031

result:

wrong answer 1st lines differ - expected: '88125041', found: '622996031'

Test #10:

score: 0
Wrong Answer
time: 53ms
memory: 3360kb

input:

17787945 13890407

output:

622996031

result:

wrong answer 1st lines differ - expected: '989967864', found: '622996031'