We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Python solution
def marsExploration(s):
# Write your code here
n = len(s)/3
origMessage = "SOS" * int(n)
counter = 0
for i in range(len(s)):
if origMessage[i] != s[i]:
counter += 1
return counter
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Mars Exploration
You are viewing a single comment's thread. Return to all comments →
Python solution def marsExploration(s): # Write your code here n = len(s)/3 origMessage = "SOS" * int(n) counter = 0 for i in range(len(s)): if origMessage[i] != s[i]: counter += 1