반응형
https://www.acmicpc.net/problem/2908
2908번: 상수
문제 상근이의 동생 상수는 수학을 정말 못한다. 상수는 숫자를 읽는데 문제가 있다. 이렇게 수학을 못하는 상수를 위해서 상근이는 수의 크기를 비교하는 문제를 내주었다. 상근이는 세 자리 ��
www.acmicpc.net
# @Author YoungMinKim
# baekjoon
a,b= map(int,input().split())
a=list(str(a))
b=list(str(b))
a.reverse()
b.reverse()
hap_a=''
hap_b=''
for i in range(3):
hap_a+=a[i]
hap_b+=b[i]
if int(hap_a)>int(hap_b):
print(int(hap_a))
else:
print(hap_b)
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 2920 (0) | 2020.08.26 |
---|---|
baekjoon - python - 2914 (0) | 2020.08.26 |
baekjoon - python - 2884 (0) | 2020.08.26 |
baekjoon - python - 2864 (0) | 2020.08.26 |
baekjoon - python - 2753 (0) | 2020.08.26 |
댓글