@@ -0,0 +1,981 @@
+package leetcode;%0A%0Apublic class Task13 %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        System.out.println(new Task13().romanToInt(%22III%22));%0A        System.out.println(new Task13().romanToInt(%22IV%22));%0A        System.out.println(new Task13().romanToInt(%22IX%22));%0A        System.out.println(new Task13().romanToInt(%22LVIII%22));%0A        System.out.println(new Task13().romanToInt(%22MCMXCIV%22));%0A    %7D%0A%0A    public int romanToInt(String s) %7B%0A        int%5B%5D dict = new int%5B128%5D;%0A        dict%5B'I'%5D = 1;%0A        dict%5B'V'%5D = 5;%0A        dict%5B'X'%5D = 10;%0A        dict%5B'L'%5D = 50;%0A        dict%5B'C'%5D = 100;%0A        dict%5B'D'%5D = 500;%0A        dict%5B'M'%5D = 1000;%0A        int result = 0;%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            int v = dict%5Bs.charAt(i)%5D;%0A            int v1 = i %3C s.length() - 1 ? dict%5Bs.charAt(i + 1)%5D : 0;%0A            if (v %3E= v1) %7B%0A                result += v;%0A            %7D else %7B%0A                result -= v;%0A            %7D%0A        %7D%0A        return result;%0A    %7D%0A%7D%0A

Add Task13