@@ -0,0 +1,656 @@
+// https://community.topcoder.com/stat?c=problem_statement&pm=13700%0A%0Apublic class SquareScoresDiv2 %7B%0A%09public static int getscore(String s) %7B%0A%09%09int score = 0;%0A%09%09%0A%09%09for (int i = 0; i %3C s.length(); ++i) %7B%0A%09%09%09for (int j = i+1; j %3C= s.length(); ++j) %7B%0A%09%09%09%09String currentSubstring = s.substring(i, j);%0A%09%09%09%09boolean allCharactersOfSubstringAreSame = true;%0A%09%09%09%09%0A%09%09%09%09for (int k = 1; k %3C currentSubstring.length(); ++k) %7B%0A%09%09%09%09%09if (currentSubstring.charAt(k) != currentSubstring.charAt(k-1)) %7B%0A%09%09%09%09%09%09allCharactersOfSubstringAreSame = false;%0A%09%09%09%09%09%09break;%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%09%0A%09%09%09%09if (allCharactersOfSubstringAreSame) %7B%0A%09%09%09%09%09score++;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09return score;%0A%09%7D%0A%7D%0A

Create SquareScoresDiv2.java