私信TA
用户名:lilace
访问量:427
签 名:
自我简介:
作者: lilace 发表时间:2022-03-28 19:33:25 浏览:104 | 评论:0
解题思路:辗转相除法求得最大公约数,再求得最小公倍数。注意事项:参考代码:
#include <stdio.h>
int main()
{
int a,b;
int t;
scanf("%d %d", &a, &b);
int sum=a*b;
while ( b != 0 )
t = a%b;
a = b;
b = t;
}
printf("%d %d",a,sum/a);
return 0;
0.0分
1 人评分
看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:
编程语言转换
万能编程问答
代码解释器
代码纠错
SQL生成与解释