728x90
풀이
11021번 A+B -7과 거의 똑같다.
추가된 건 A, +, B, =, A+B 이렇게 5개인데, A와 B, A+B는 숫자라서 그냥 넣어주면 된다.
다만 +와 =는 str이라서 '' 안에 넣어줘야 한다.
sep=' '으로 다 붙여주고 '' 안에서 띄어쓰기로 조절하면 된다.
코드
T = int(input())
for i in range(T):
A, B = map(int, input().split())
print('Case #', i+1, ': ', A, ' + ', B, ' = ', A+B, sep='')
728x90
'🥧 Python > ⚙️ 코딩테스트' 카테고리의 다른 글
[백준-Python] 7287번: 등록 (0) | 2023.02.14 |
---|---|
[백준-Python] 10699번: 오늘 날짜 (0) | 2023.02.14 |
[백준-Python] 11021번: A+B -7 (0) | 2023.02.14 |
[백준-Python] 2163번: 초콜릿 자르기 (0) | 2023.02.14 |
[백준-Python] 3046번: R2 (0) | 2023.02.14 |