80分,求助!!!!
查看原帖
80分,求助!!!!
343245
Bigfish_楼主2021/10/2 15:01
#include <bits/stdc++.h>
using namespace std;
int x1,x2,x3,t=2,ave=0;
int main()
{
	cin>>x1>>x2;
	if(x2%x1==0) 
		x3=x2/x1;
	else
	{
		cout<<0;
		return 0;
	} 
	for(int t=2;t<=x3;++t)
	{
		if(x3%t==0)
		{
			while(x3%t==0)
				x3/=t;				
			++ave;
		}
	}
	cout<<2+(ave-1)*ave;
	return 0;
}
2021/10/2 15:01
加载中...