반응형
https://www.acmicpc.net/problem/10610
# @Author YoungMinKim
# baekjoon
import sys
N = list(sys.stdin.readline()[:-1])
ls = sorted(N,reverse=True)
if ls[-1] != '0':
print(-1)
elif int(''.join(ls)) % 30 ==0:
print(int(''.join(ls)))
else:
print(-1)
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 10987 (0) | 2020.09.06 |
---|---|
baekjoon - python - 10953 (0) | 2020.09.06 |
baekjoon - python - 4949 (0) | 2020.09.05 |
python - baekjoon - 9012 (0) | 2020.09.05 |
python - baekjoon - 10814 (0) | 2020.09.05 |
댓글