백준#15873 Bronze4 공백 없는 A+B (Python, 파이썬)

임준성·2022년 5월 2일
0

백준 Algorithm

목록 보기
1/59
post-thumbnail

백준 15873번

https://www.acmicpc.net/problem/15873



n= input()

#b가 10일 때의 경우를 처리해준다.
if n[-2] + n[-1] == "10":  

    print( int(n[:-2]) + 10)


#그 외의 모든 상황은 b는 일의자리다.

else:

    print( int(n[:-1]) + int(n[-1]) )



profile
아무띵크 있이

0개의 댓글