You are viewing a single comment's thread. Return to all comments →
java
public static void main(String[] args) { Scanner in = new Scanner(System.in); String S = in.next(); String sos = "SOS"; int count =0; for (int i = 0; i < S.length(); i++) { if (S.charAt(i) != sos.charAt(i % 3)) count++; } System.out.println(count); }
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 →
java