#C1008. Sum of Two Large Integers
Sum of Two Large Integers
Sum of Two Large Integers
You are given two non-negative integers A and B represented as strings. Your task is to compute their sum. In mathematical terms, you need to compute \(A+B\).
The input consists of two lines, each containing a large integer. Note that the integers can be very large, so you should not use built‐in arithmetic types that might overflow. Instead, the addition should be performed by simulating the digit addition process (or using libraries that support arbitrary precision arithmetic).
For example, if A is "12345" and B is "678", then the output should be "13023".
inputFormat
The input is provided via standard input (stdin) consisting of two lines:
- The first line contains the string representation of the first non-negative integer (A).
- The second line contains the string representation of the second non-negative integer (B).
outputFormat
Output the sum of the two integers, also as a string, to the standard output (stdout).## sample
0
0
0