Skip to content

Commit

Permalink
add 2864
Browse files Browse the repository at this point in the history
  • Loading branch information
5d-jh committed Mar 27, 2022
1 parent 9a1c5ab commit f2f5d5d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions greedy/2864.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## 백준 2864
https://www.acmicpc.net/problem/2864

### 소스코드
```py
a, b = input().split()

maxval = int(a.replace('5', '6')) + int(b.replace('5', '6'))
minval = int(a.replace('6', '5')) + int(b.replace('6', '5'))

print(minval, maxval)
```

### 해설
6을 5로 치환하여 최솟값을 구하고, 5를 6으로 치환하여 최댓값을 구한다.

0 comments on commit f2f5d5d

Please sign in to comment.