Programming/Python & Data Structures
[Baekjoon/Python3] 2864번 5와 6의 차이
HooNeee
2020. 12. 4. 12:50
[Baekjoon/Python3] 2864번 5와 6의 차이
2864번: 5와 6의 차이
첫째 줄에 두 정수 A와 B가 주어진다. (1 <= A,B <= 1,000,000)
www.acmicpc.net
a, b = input().split()
minimum = int(a.replace('6', '5')) + int(b.replace('6', '5'))
maximum = int(a.replace('5', '6')) + int(b.replace('5', '6'))
print(minimum, maximum)