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