A space explorer's ship crashed on Mars! They send a series of SOS messages to Earth for help.
Letters in some of the SOS messages are altered by cosmic radiation during transmission. Given the signal received by Earth as a string, , determine how many letters of the SOS message have been changed by radiation.
The original message was SOSSOS. Two of the message's characters were changed in transit.
Complete the marsExploration function in the editor below.
marsExploration has the following parameter(s):
string s: the string as received on Earth
int: the number of letters changed during transmission
There is one line of input: a single string, .
will contain only uppercase English letters, ascii[A-Z].
Sample Input 0
Sample Output 0
= SOSSPSSQSSOR, and signal length . They sent SOS messages (i.e.: ).
Expected signal: SOSSOSSOSSOS
Recieved signal: SOSSPSSQSSOR
Difference: X X X
Sample Input 1
Sample Output 1
= SOSSOT, and signal length . They sent SOS messages (i.e.: ).
Expected Signal: SOSSOS
Received Signal: SOSSOT