Question: Please use Python, thank you! 12. [Programming] Signal Matches A signal is monitored every second starting at t=0, when its value is recorded as an
![Please use Python, thank you! 12. [Programming] Signal Matches A signal](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f9497808612_30366f949779cc5f.jpg)
Please use Python, thank you!
12. [Programming] Signal Matches A signal is monitored every second starting at t=0, when its value is recorded as an integer. An example signal might look like: 103 25 4 30 2 17 which is a sequence of positive integers separated by a single space each. Your program reads in two lines on Standard Input, each denoting a separate signal. The signals may be of unequal length. We say that two signals match when they have the exact same value at the same time. Your task: Given two signals, how many distinct values do they match on? Print your answer on Standard Output. Example Input 10 3 25 4 30 2 174 93 20 41 142483 Output: 2 Explanation The two signals match at three different points, 1,3 and 7 seconds with values 3, 4 and 4 respectively. Thus they match on two distinct values 3 and 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
