@@ -0,0 +1,929 @@
+// https://community.topcoder.com/stat?c=problem_statement&pm=2272%0A%0Apublic class SimpleCalculator %7B%0A%09public static int calculate(String input) %7B%0A%09%09// Get operator%0A%09%09char operator = '?';%0A%09%09int i = 0;%0A%09%09while (true) %7B%0A%09%09%09if (input.charAt(i) == '+' %7C%7C input.charAt(i) == '-' %7C%7C input.charAt(i) == '*' %7C%7Cinput.charAt(i) == '/') %7B%0A%09%09%09%09operator = input.charAt(i);%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%09i++;%0A%09%09%7D%0A%09%09%0A%09%09// Calculate expression%0A%09%09int result = 0;%0A%09%09switch (operator) %7B%0A%09%09case '+':%0A%09%09%09return (Integer.parseInt(input.substring(0, i)) + Integer.parseInt(input.substring(i+1)));%0A%09%09case '-':%0A%09%09%09return (Integer.parseInt(input.substring(0, i)) - Integer.parseInt(input.substring(i+1)));%0A%09%09case '*':%0A%09%09%09return (Integer.parseInt(input.substring(0, i)) * Integer.parseInt(input.substring(i+1)));%0A%09%09case '/':%0A%09%09%09return (Integer.parseInt(input.substring(0, i)) / Integer.parseInt(input.substring(i+1)));%0A%09%09default:%0A%09%09%09break;%0A%09%09%7D%0A%09%09%0A%09%09return result;%0A%09%7D%0A%7D%0A

Create SimpleCalculator.java