- [NOIP2001-普及]最大公约数和最小公倍数问题
四十?????
- 2025-8-19 14:20:54 @
#include <bits/stdc++.h>
using namespace std;
int number(int x,int y)
{
if(y%x!=0)
{
return 0;
}
int product = y/x;
int count = 0;
for(int i=1;i<=sqrt(product);i++)
{
if(product%i==0)
int j = product/i;
count++;
}
return count;
}
int main()
{
int x,y;
cin>>x>>y;
int result = number(x,y);
cout<<result;
}
0 条评论
目前还没有评论...
信息
- ID
- 528
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 48
- 已通过
- 11
- 上传者