You are viewing a single comment's thread. Return to all comments →
int marsExploration(string s) { int r = 0; for (int i = 0, e = s.size(); i < e; ++i) { if (!(i % 3 == 1 && s[i] == 'O' || i % 3 != 1 && s[i] == 'S')) { ++r; } } return r; }
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 →