문제풀이/백준(Boj) 문제풀이

[백준][그리디 알고리즘] 20044. Project Teams(파이썬/Python)

얄루몬 2021. 12. 27. 15:55

a, b = input().split()

min_n = int(a.replace('6','5')) + int(b.replace('6','5'))
max_n = int(a.replace('5','6')) + int(b.replace('5','6'))

print(min_n,max_n)