We always get maximum sum if we replace 5 with 6.
maxSum = replaceDig ( x1 , 5 , 6 ) + replaceDig ( x2 , 5 , 6 ) NEW_LINE print ( " Minimum ▁ sum ▁ = " , minSum ) NEW_LINE print ( " Maximum ▁ sum ▁ = " , maxSum , end = " ▁ " ) NEW_LINE