@@ -0,0 +1,739 @@
+import java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0Aimport java.util.StringTokenizer;%0A%0Apublic class Partition %7B%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));%0A        String numberOfElements = reader.readLine();%0A        String elements = reader.readLine();%0A        System.out.println(new Partition().run(elements));%0A    %7D%0A%0A    public String run(String input) %7B%0A        long result = 0;%0A        StringTokenizer tokenizer = new StringTokenizer(input);%0A        while (tokenizer.hasMoreTokens()) %7B%0A            result += Math.abs(Integer.parseInt(tokenizer.nextToken()));%0A        %7D%0A        return String.valueOf(result);%0A    %7D%0A%7D%0A

Add Partition