コード例 #1
0
        public static void Main()
        {
            string twentySixBasedNumberAsString = Console.ReadLine();
            string operationSign            = Console.ReadLine();
            string sevenBasedNumberAsString = Console.ReadLine();

            BigInteger sum = 0;

            if (operationSign.Contains("+"))
            {
                sum = NumberConverter.TwentySixBasedNumberToDecimalNumber(twentySixBasedNumberAsString)
                      + NumberConverter.SevenBasedNumberToDecimalNumber(sevenBasedNumberAsString);
            }

            if (operationSign.Contains("-"))
            {
                sum = NumberConverter.TwentySixBasedNumberToDecimalNumber(twentySixBasedNumberAsString)
                      - NumberConverter.SevenBasedNumberToDecimalNumber(sevenBasedNumberAsString);
            }

            Console.WriteLine(NumberConverter.DecimalNumberToNineBasedNumber(sum));
        }