Sign in
or
Register
Courses
Textbook
Compiler
Contests
Topics
Courses
Python. Data storage and processing
(Python) Sets
Module:
(Python) Sets
Problem
3
/10
Working with sets. Methods - 2
Theory
Click to read/hide
Error
Problem
Mishka decided to test Deniska's abilities on other tasks. For example, I decided to check whether Deniska from two lists of numbers can quickly calculate the number of numbers that occur simultaneously in both. As we know, Deniska likes to show off and said that he would easily do it. He asks you to write a program for him.
In Python, this can be done in one line.
Input
Two lists of numbers are entered. All numbers of each list are on a separate line.
Imprint
Print the answer to the problem.
Examples
#
Input
Output
1
1 3 2
5 1 2
2
1000
ms
256 Mb
Rules for program design and list of errors in automatic problem checking
Teacher commentary