#P6500. [COCI 2010/2011 #3] ZBROJ
[COCI 2010/2011 #3] ZBROJ
Description
The teacher gave Perica two numbers and . Perica copied them into his notebook and wants to compute their sum.
While copying, Perica might mistakenly copy the digit in or as , or mistakenly copy the digit as . Of course, he might also copy them correctly.
Given and , find the minimum and maximum possible values of the sum Perica computed.
Input Format
The input contains only one line with two integers, which are and .
Output Format
Output one line with two integers: the minimum possible sum and the maximum possible sum.
11 25
36 37
1430 4862
6282 6292
16796 58786
74580 85582
Hint
Constraints
For all testdata, it is guaranteed that .
Notes
This problem is translated from COCI2010-2011 CONTEST #3 T2 ZBROJ.
Translated by ChatGPT 5
京公网安备 11011102002149号