/ 科创班 /

记录详情

Accepted


  
# 状态 耗时 内存占用
#1 Accepted 2ms 256.0 KiB
#2 Accepted 1ms 256.0 KiB
#3 Accepted 2ms 256.0 KiB
#4 Accepted 2ms 256.0 KiB
#5 Accepted 2ms 256.0 KiB
#6 Accepted 2ms 256.0 KiB
#7 Accepted 2ms 256.0 KiB
#8 Accepted 2ms 256.0 KiB
#9 Accepted 2ms 256.0 KiB
#10 Accepted 2ms 256.0 KiB

代码

#include<stdio.h>
int main(){
	int a,b,num1,num2,temp;
	scanf("%d,%d",&num1,&num2);
	if(num1<num2){
		temp = num1;
		num1 = num2;
		num2 = temp;
	}
	a = num1;
	b = num2;
	while(b!=0){   
		temp = a%b;
		a=b;
		b=temp;
	}
	printf("%d,%d",a,num1*num2/a);
	return 0;
}

信息

递交者
类型
递交
题目
5.3最大公约数与最小公倍数
题目数据
下载
语言
C
递交时间
2018-07-18 21:36:37
评测时间
2018-07-18 21:36:37
评测机
分数
100
总耗时
24ms
峰值内存
256.0 KiB