# 求两个给定正整数的最大公约数和最小公倍数

<pre><p>本题要求两个给定正整数的最大公约数和最小公倍数。
输入格式:<br />
输入在两行中分别输入正整数x和y。<br />
输出格式:<br />
在一行中输出最大公约数和最小公倍数的值。<br />
</pre><pre>输入样例1:<br />
在这里给出一组输入。<br />
例如&#xff1a;</p><pre><code>100
1520</code></pre><p>输出样例1:<br />
在这里给出相应的输出。<br />
例如&#xff1a;</p><pre><code>20 7600</code></pre></pre>

以下程序实现了这一功能，请你填补空白处内容：

```python
def hcf(x, y):
   if x > y:
	   smaller = y
   else:
	   smaller = x 
   for i in range(1,smaller + 1):
	   if((x % i == 0) and (y % i == 0)):
		   hcf = i 
   return hcf
def lcm(x, y): 
   if x > y:
	   greater = x
   else:
	   greater = y
   while(True):
	   ____________________;
	   greater += 1
   return lcm
num1 = int(input("输入第一个数字: "))
num2 = int(input("输入第二个数字: "))
print("最大公约数为",hcf(num1, num2),"最小公倍数为",lcm(num1,num2))
```

## template

```python
def hcf(x, y):
   if x > y:
	   smaller = y
   else:
	   smaller = x 
   for i in range(1,smaller + 1):
	   if((x % i == 0) and (y % i == 0)):
		   hcf = i 
   return hcf
def lcm(x, y): 
   if x > y:
	   greater = x
   else:
	   greater = y
   while(True):
	   if((greater % x == 0) and (greater % y == 0)):
		   lcm = greater
		   break
	   greater += 1
   return lcm
num1 = int(input("输入第一个数字: "))
num2 = int(input("输入第二个数字: "))
print("最大公约数为",hcf(num1, num2),"最小公倍数为",lcm(num1,num2))
```

## 答案

```python
if((greater % x == 0) and (greater % y == 0)):
	lcm = greater
	break
```

## 选项

### A

```python
if((greater % x == 1) and (greater % y == 1)):
	lcm = greater
	break
```

### B

```python
if((greater % x == 0) or (greater % y == 0)):
	lcm = greater
	break
```

### C

```python
if((greater % x == 1) or (greater % y == 1)):
	lcm = greater
	break
```