public String intToRoman(int num) {
            String roman = "";
            int scala = 1000;
            for (int i = 0; i < symbols.length; i += 2) {
                int digit = num / scala;
                num %= scala;
                scala /= 10;
                if (digit == 9) {
                    roman += symbols[i];
                    roman += symbols[i - 2];
                } else if (digit >= 5) {
                    roman += symbols[i - 1];
                    roman += repeat(symbols[i], digit - 5);
                } else if (digit == 4) {
                    roman += symbols[i];
                    roman += symbols[i - 1];
                } else {
                    roman += repeat(symbols[i], digit);
                }
            }
            return roman;
        }