Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- w3school
- DP
- 프로그래밍
- 문제풀이
- Unreal Engine 5
- github
- C#
- dfs
- python
- Class
- Tutorial
- UE5
- Programming
- dynamic
- Basic
- Unity
- 파이썬
- c++
- W3Schools
- 재귀
- 기초
- 시작해요 언리얼 2022
- 백준
- Algorithm
- 오류
- Material
- String
- guide
- loop
- parameter
Archives
- Today
- Total
행복한 개구리
백준 21.10.26. 2908 - 상수 본문

A, B = map(str, input().split())
A = A[2] + A[1] + A[0]
B = B[2] + B[1] + B[0]
if int(A) > int(B) :
print(A)
else :
print(B)
숫자의 자리를 바꿀때는 문자열로 작업하는 것이 편하기때문에 매핑을 할 때 문자열로 받았다. 그리고 자리를 바꿔준 뒤에 정수로 형변환을 시켜 크기비교를 했다.
'Algorithm > BaekJoon' 카테고리의 다른 글
| 백준21.11.25. 2941번 - 크로아티아 알파벳 (0) | 2021.11.25 |
|---|---|
| 백준 21.10.27. 5622 - 다이얼 (0) | 2021.10.27 |
| 백준 21.10.26. 1152 - 단어의 개수 (0) | 2021.10.26 |
| 백준 21.10.26. 1157 - 단어 공부 (0) | 2021.10.26 |
| 백준 21.10.26. 2675 - 문자열 반복 (0) | 2021.10.26 |