- 最大公约数
802
- 2024-3-2 19:22:26 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
int m=0,n=0,a=0;
cin>>m>>n;
do
{
a=m%n;
m=n;
n=a;
}while(a>0);
cout<<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