@@ -0,0 +1,1596 @@
+public class Solution %7B%0A    public String intToRoman(int num) %7B%0A        String result = %22%22;%0A        result += test(num, 1000, 500, 100);%0A        num %25= 100;%0A        result += test(num, 100, 50, 10);%0A        num %25= 10;%0A        result += test(num, 10, 5, 1);%0A        return result;%0A    %7D%0A    %0A    private String test(int num, int larger, int half, int smaller)%7B%0A        String result = %22%22;%0A        while(num %3E= larger)%7B%0A            result += match(larger);%0A            num -= larger;%0A        %7D%0A        if(num + smaller %3E= larger)%7B%0A            result += match(smaller);%0A            result += match(larger);%0A            num %25= smaller;%0A        %7Delse%7B%0A            while(num %3E= half)%7B%0A                result += match(half);%0A                num -= half;%0A            %7D%0A            if(num + smaller %3E= half)%7B%0A                result += match(smaller);%0A                result += match(half);%0A                num %25= smaller;%0A            %7Delse%7B%0A                while(num %3E= smaller)%7B%0A                    result += match(smaller);%0A                    num -= smaller;%0A                %7D%0A            %7D%0A        %7D%0A        return result;%0A    %7D%0A    %0A    private String match(int num)%7B%0A        switch(num)%7B%0A            case 1000: %0A                return %22M%22;%0A            case 500:%0A                return %22D%22;%0A            case 100:%0A                return %22C%22;%0A            case 50:%0A                return %22L%22;%0A            case 10:%0A                return %22X%22;%0A            case 5:%0A                return %22V%22;%0A            case 1:%0A                return %22I%22;%0A            default:%0A                return %22%22;%0A        %7D%0A    %7D%0A%7D

Q12 Integer to Roman