标签:刷题记录 nbsp 刷题 log fine bsp scan data for
5 7
1 35
1 #include <stdio.h> 2 #define MIN(a,b) (a<b)?a:b 3 4 int main(){ 5 unsigned int number_1,number_2,min,i; 6 int highest_divissor =1,lowest_multiple; 7 scanf("%d %d",&number_1,&number_2); 8 min = MIN(number_1,number_2); 9 for(i=2;i<=min;i++) 10 { 11 if (number_1%i == 0 && number_2%i ==0) 12 { 13 highest_divissor = i; 14 } 15 } 16 lowest_multiple = (number_1*number_2)/highest_divissor; 17 printf("%d %d",highest_divissor,lowest_multiple); 18 return 0; 19 }
标签:刷题记录 nbsp 刷题 log fine bsp scan data for
原文地址:http://www.cnblogs.com/xiangxyq/p/7799693.html