• 1
    Input and Output Data
    • Tasks
  • 2
    Conditions
    • Tasks
  • 3
    For Loop
    • Tasks
  • 4
    Strings
    • Tasks
  • 5
    While Loop
    • Tasks
  • 6
    Lists
    • Tasks
  • 7
    Two-Dimensional Arrays
    • Tasks
  • 8
    Dictionaries
    • Tasks
  • 9
    Sets
    • Tasks
  • 10
    Functions and Recursion
    • Tasks
  • к

Занятие 7. Two -dimensional arrays

Difficulty level:

Task«Accounting for products in stock»

reject (Inventory, Threshold) , which filters the warehouse & nbsp; inventory & nbsp; and returns a new array containing only cells with the number of products Less & nbsp; Threshold .

Input format

first the number of shelves n & nbsp; (an integer). Style = "Text-align: Justify;"> Then n & nbsp; lines, each of which is one shelf. Each line contains the number of cells on the shelf & nbsp; m & nbsp; (an integer), followed by & nbsp; m & nbsp; integers separated by spaces, & ndash; The number of products in each cell.
rn
at the end the threshold value of Threshold (the whole Number)

Output format

The program should display a new two-dimensional massif representing a filtered warehouse. Each line of the array should correspond to the filtered shelf. Lines are displayed on separate lines. In each line, the values ​​of cells are displayed, separated by spaces. If after filtration on the shelf there are no cells left, only & nbsp; 0
is displayed

Example

Input

3
4 10 5 2 8
3 3 1 7
2 6 4
5

Output

3 5 2 3
2 3 1
1 4

Hint

There will be no clue here, decide for yourself!

main.py
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
Test 7
Test 8
Test 9
Test 10
Developer’s solution

🎉 Congratulations! 🎉

You did an excellent job with the task! It was a challenging problem, but you found the correct solution. You are one step closer to mastering programming! Keep up the good work, because every stage you pass makes you even stronger.

AD

Advertisement

red-snake blue-snake green-snake

Running your code...

Помощник ИИ

Привет! Я твой помощник по программированию. Задавай любые вопросы по Python, я могу рассказать о функциях, методах, обьяснить то, что тебе не понятно, а так же о текущей задаче!