Find the multiple of given number in the list of integers.
Input:
First Line of the Input is the Number of Elements in the List
Second Line of Input has the elements of the List
Third line has has the number for which you have to find the multiples
Output:
Print the Multiples
INPUT
5
6 7 8 13 11
3
OUTPUT
6
N = int(input("Number of Elements: ")) L1 = list(map(int,input("Enter the Elements: ").split(" "))) Div = int(input("Divisible Number: ")) print("Multiples: ") for i in range(N): if L1[i] % Div==0: print(L1[i])
INPUT_1:
Number of Elements: 5
Enter the Elements: 6 7 8 13 11
Divisible Number: 3
OUTPUT:
Multiples:
6
INPUT_2:
Number of Elements: 8
Enter the Elements: 2 4 5 3 7 9 24 10
Divisible Number: 2
OUTPUT:
Multiples:
2
4
24
10
ILLUSTRATION
![](http://www.fcukthecode.com/wp-content/uploads/2022/03/Screenshot-from-2022-03-14-16-19-46.png)
Morae Q!
- Convert from binary number to decimal number.
- Swap two numbers by using division and multiplication.
- Compute foot and inches into centimetres.
- Concatenate Strings.
- Convert lowercase letters to uppercase letters.
- Compute the sum of all the digits of N.
- Compute the area of the pentagon.
- Get input using scanner.
- Find the distance between two points (x1,y1) and (x2,y2).
- Finding patterns in a file using frep and egrep .
- Detecting a cycle in a directed graph using Depth First Traversal.
- Topological ordering in a Graph.
- Storing graphs using adjacency list.
- Introduction to graph theory.
- Graph Adjacency Matrix pseudo code.
- Adjacency Matrix for storing graphs.
- Dijkstra’s shortest path algorithm .
- Breadth first search (BFS) Algorithm.
- Find the multiple of given number in the list of integers.
- Finding patterns in files using grep .