Олимпиадный тренинг

Задача 37525. Features of the selection of vector elements


Задача

Темы: NumPy

The input is two sets of integers, each in its own line. The numbers are space-separated. Create a vector V that will contain the numbers from the first set divided by the penultimate number from the second set, if the number from the first set is evenly divisible by the penultimate number from the second set.

If there are no such numbers, then the vector V will be empty (that is, it will not contain elements).

 

Examples
# Input Output
1 1 2 
10 10
[]
2 1 2 3 4 5 6
1 2 3 4
[1. 2.]