- 最大公约数
1
- 2024-5-12 15:22:42 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long m=0,n=0,a=0,b=0;
cin>>m>>n;
b=m*n;
do
{
a=m%n;
m=n;
n=a;
}while(a>0);
cout<<b/m;
return 0;
}
0 comments
No comments so far...
Information
- ID
- 802
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 6
- Tags
- # Submissions
- 75
- Accepted
- 22
- Uploaded By