@@ -0,0 +1,525 @@
+// https://community.topcoder.com/stat?c=problem_statement&pm=11279%0A%0Apublic class SlimeXSlimeRancher2 %7B%0A%09public static int train(int%5B%5D attributes) %7B%0A%09%09// Get max attribute value%0A%09%09int maxAttribute = 0;%0A%09%09for (int attribute : attributes) %7B%0A%09%09%09if (attribute %3E maxAttribute) %7B%0A%09%09%09%09maxAttribute = attribute;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09// Get min weight, based on max attribute value%0A%09%09int minWeight = 0;%0A%09%09for (int i = 0; i %3C attributes.length; ++i) %7B%0A%09%09%09minWeight += Math.abs( maxAttribute - attributes%5Bi%5D );%0A%09%09%7D%0A%09%09%0A%09%09return minWeight;%0A%09%7D%0A%7D%0A

Create SlimeXSlimeRancher2.java