T = int(input())
answer = []
for test_case in range(1, T + 1):
result = []
s = list(input())
for i in range(1, len(s)):
a = ''.join(s[:i])
b = ''.join(s[i:])
result.append(int(a) + int(b))
answer.append(min(result))
for index in range(len(answer)):
print(f'#{index+1} {answer[index]}')
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AYe7x0DKBJADFARP
SW Expert Academy
SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!
swexpertacademy.com
728x90
'Algorithm&CodingTest > SW Expert Acardemy' 카테고리의 다른 글
[SWEA][D1] [2025] N줄 덧셈 - Python (0) | 2023.05.16 |
---|---|
[SWEA] [2046] 스탬프 찍기 - python (0) | 2023.05.16 |
[SWEA] [2047] 신문 헤드라인 - python (0) | 2023.05.16 |
[SWEA] [1938] 아주 간단한 계산기 - python (1) | 2023.05.16 |
[SWEA] [2072] 홀수만 더하기 - python (0) | 2023.05.14 |