##
Maximum and minimum sums from two numbers with digit replacements
February 15, 2017

Given two positive numbers calculate the minimum and maximum possible sums of two numbers. We are allowed to replace digit 5 with digit 6 and vice versa in either or both the given numbers. Examples: Input : x1 = 645 x2 = 666 Output : Minimum Sum: 1100 (545 + 555) Maximum Sum: 1312 (646… Read More »