34分求助
  • 板块P1593 因子和
  • 楼主Yousc1231
  • 当前回复2
  • 已保存回复2
  • 发布时间2023/7/8 12:26
  • 上次更新2023/11/3 11:04:23
查看原帖
34分求助
923465
Yousc1231楼主2023/7/8 12:26
#include <iostream>
#include <cmath>
using namespace std;
long long sum;
int main(){
	int a,b; cin>>a>>b;
	long long cnt=pow(a,b);
	for(int i=1;i*i<=cnt;++i){
		if(cnt%i==0){
			sum+=i;
			if(cnt/i!=i) sum+=cnt/i;
		}
	}
	cout<<sum%9901;
	return 0;
}
2023/7/8 12:26
加载中...