Problem:
Addition of Big Integers

Given two integers $A$ and $B$, compute the sum, $A + B$.

Input

Two integers $A$ and $B$ separated by a space character are given in a line.

Output

Print the sum in a line.

Constraints

$-1 \times 10^{100000} \leq A, B \leq 10^{100000}$

Sample Input 1

5 8

Sample Output 1

13

Sample Input 2

100 25

Sample Output 2

125

Sample Input 3

-1 1

Sample Output 3

0

Sample Input 4

12 -3

Sample Output 4

9

Solution in C# (judge verdict: Accepted)

using System.Linq;
using System;

public class hello
{
    public static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = line[0];
        var b = line[1];
        if (a[0] == '-' && b[0] == '-')
        {
            Console.Write('-');
            plus(a.Substring(1), b.Substring(1));
        }
        else if (a[0] == '-' && b[0] != '-') minus(b, a.Substring(1));
        else if (a[0] != '-' && b[0] == '-') minus(a, b.Substring(1));
        else plus(a, b);
    }
    static void minus(string s2, string t2)
    {
        if (s2 == t2) { Console.WriteLine(0); return; }
        var sL = s2.Length;
        var tL = t2.Length;
        if (sL < tL) { Console.Write('-'); minus(t2, s2); return; }
        if (tL == sL && s2.CompareTo(t2) == -1)
        { Console.Write('-'); minus(t2, s2); return; }
        if (sL > tL) t2 = new string('0', sL - tL) + t2;
        else s2 = new string('0', tL - sL) + s2;
        var s = s2.ToCharArray();
        var t = t2.ToCharArray();
        var ans = new int[sL];
        Array.Reverse(s);
        Array.Reverse(t);
        var p = 0;
        var c = false;
        while (p < sL)
        {
            var sub = s[p] - t[p];
            if (c) sub--;
            if (sub < 0) { sub += 10; c = true; }
            else c = false;
            ans[p] = sub;
            p++;
        }
        Console.WriteLine(string.Join("", ans.Reverse().SkipWhile(x => x == 0)));
    }
    static void plus(string s2, string t2)
    {
        var sL = s2.Length;
        var tL = t2.Length;
        if (tL > sL) { plus(t2, s2); return; }
        t2 = new string('0', sL - tL) + t2;
        var s = s2.ToCharArray();
        var t = t2.ToCharArray();
        var ans = new int[sL];
        Array.Reverse(s);
        Array.Reverse(t);
        var p = 0;
        var c = false;
        while (p < sL)
        {
            var add = s[p] - '0' + t[p] - '0';
            if (c) add++;
            if (add >= 10) { add -= 10; c = true; }
            else c = false;
            ans[p] = add;
            p++;
        }
        Array.Reverse(ans);
        if (c) Console.Write(1);
        Console.WriteLine(string.Join("", ans));
    }
}