QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#297924#5817. 小学生数学题_JF_0 0ms0kbC++14458b2024-01-05 13:33:302024-01-05 13:33:30

Judging History

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

  • [2024-01-05 13:33:30]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-01-05 13:33:30]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int mod=998244353;
#define int long long
int Quickpow(int a,int b){
	int ans=1,now=a;
	while(b>0){
		if(b&1)	ans*=now,ans%=mod;
		now*=now,now%=mod;
		b>>=1;
	}
	return ans;
} 
signed main(){
	int n,k,now=1,ans=0;
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++){
		now*=(i%mod),now%=mod;
		int pre=Quickpow(Quickpow(i,k),mod-2);
		ans=(ans%mod+pre%mod*now%mod)%mod;
	}
	cout<<ans<<endl;
}

详细

Test #1:

score: 0
Time Limit Exceeded

input:

9450395 1

output:


result:


Test #2:

score: 0
Time Limit Exceeded

input:

8978812 1

output:


result:


Test #3:

score: 0
Time Limit Exceeded

input:

8944235 1

output:


result:


Test #4:

score: 0
Time Limit Exceeded

input:

7081118 3

output:


result:


Test #5:

score: 0
Time Limit Exceeded

input:

7904241 3

output:


result:


Test #6:

score: 0
Time Limit Exceeded

input:

9921275 3

output:


result:


Test #7:

score: 0
Time Limit Exceeded

input:

17575748 14135489

output:


result:


Test #8:

score: 0
Time Limit Exceeded

input:

19858362 14822524

output:


result:


Test #9:

score: 0
Time Limit Exceeded

input:

18848696 15530895

output:


result:


Test #10:

score: 0
Time Limit Exceeded

input:

17787945 13890407

output:


result: