Created
September 6, 2016 20:30
-
-
Save ooade/e99f41887c59c62620903ea813c1f840 to your computer and use it in GitHub Desktop.
Mars Exploration 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() { | |
let S = readLine().match(/.{1,3}/g); | |
let count = 0; | |
for (let i in S) { | |
if (S[i][0] !== 'S') { | |
count++; | |
} | |
if (S[i][1] !== 'O') { | |
count++; | |
} | |
if (S[i][2] !== 'S') { | |
count++; | |
} | |
} | |
console.log(count); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment