@@ -0,0 +1,794 @@
+// https://community.topcoder.com/stat?c=problem_statement&pm=11936%0A%0Apublic class WorkingRabbits %7B%0A%09public static double getEfficiency(String%5B%5D profit) %7B%0A%09%09int P = 0;%0A%09%09int rowStartIndex = 1; // we only need the elements after the main diagonal%0A%09%09%0A%09%09for (int i = 0; i %3C profit.length; ++i) %7B%0A%09%09%09for (int j = rowStartIndex; j %3C profit%5Bi%5D.length(); ++j) %7B%0A%09%09%09%09P += Character.getNumericValue(profit%5Bi%5D.charAt(j));%0A%09%09%09%7D%0A%09%09%09rowStartIndex++;%0A%09%09%7D%0A%09%09%0A%09%09/*%0A%09%09 * The number of unique pairs can be calculated via a formula, which is explained here:%0A%09%09 * - http://stackoverflow.com/questions/18859430/how-do-i-get-the-total-number-of-unique-pairs-of-a-set-in-the-database%0A%09%09 */%0A%09%09 int Q = (profit.length) * (profit.length - 1) / 2; %0A%09%09%0A%09%09 double efficiency = (double) P / Q;%0A%09%09 %0A%09%09 return efficiency;%0A%09%7D%0A%7D%0A

Create WorkingRabbits.java