Skip to content

Instantly share code, notes, and snippets.

@Abdujabbar
Created February 1, 2016 07:13
Show Gist options
  • Save Abdujabbar/d31867b566cc4dfa3203 to your computer and use it in GitHub Desktop.
Save Abdujabbar/d31867b566cc4dfa3203 to your computer and use it in GitHub Desktop.
mars-esploration
__author__ = 'abdujabbor'
s = input()
pattern = 'SOS'
counter = 0
for i in range(0, len(s), 3):
curr = s[i:i + 3]
found = 0
for t in range(len(pattern)):
if pattern[t] == curr[t]:
found += 1
counter += (3 - found)
print(counter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment