Given a list of the integers and M, N and we have to print the numbers which are divisible by M, N in Python.
给定整数和M , N的列表,我们必须打印在Python中可被M , N整除的数字。
Example:
例:
Input:
List = [10, 15, 20, 25, 30]
M = 3, N=5
Output:
15
30
To find and print the list of the numbers which are divisible by M and N, we have to traverse all elements using a loop, and check whether the number is divisible by M and N, if number is divisible by M and N both print the number.
要查找并打印可被M和N整除的数字列表,我们必须使用循环遍历所有元素,并检查数字是否可被M和N整除,如果数字可被M和N整除,则都将打印数。
Program: