最大公约数
#include<iostream>
int main()
{
int m,n,i;
scanf("%d",&m);
scanf("%d",&n);
for(i=m;i>=1;i--)
if(m%i==0 && n%i==0)
break;
printf("%d\n",i);
return 0;
}
int main()
{
int m,n,i;
scanf("%d",&m);
scanf("%d",&n);
for(i=m;i>=1;i--)
if(m%i==0 && n%i==0)
break;
printf("%d\n",i);
return 0;
}
Last one:My Father
Next one:我们的故事
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
Hot degree:★★☆☆☆
Difficulty:★★★★★
quality:☆☆☆☆☆
Description: the system according to the heat, the difficulty, the quality of automatic certification, the certification of the article will be involved in typing!
This paper typing ranking TOP20
登录后可见