티스토리 뷰
https://www.acmicpc.net/problem/3486
3486번: Adding Reversed Numbers
The Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dramatic advisor of ACM has decided to transfigure some tragedies into comedies. Obviously, this work is very hard beca
www.acmicpc.net
[소스 코드]
n = int(input()) # 테스트 케이스 수
for i in range(n):
first, second = input().split() # 첫번째 수와 두번째 수를 입력 받음
sum = int(first[::-1]) + int(second[::-1]) # 주어진 숫자를 입력 받아 거꾸로 바꾼 후 더함
print(int(str(sum)[::-1])) # 더한 숫자를 거꾸로 출력
'알고리즘 문제풀이 > BOJ' 카테고리의 다른 글
| [BOJ] 1459 걷기 - Python (0) | 2020.08.19 |
|---|---|
| [BOJ] 5585 거스름돈 - Python (0) | 2020.08.19 |
| [BOJ] 2857 대회 or 인턴 - Python (0) | 2020.08.19 |
| [BOJ] 단계별로 풀어보기 - 7 (0) | 2020.02.25 |
| [BOJ] 단계별로 풀어보기 - 6 (0) | 2020.02.12 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 구현
- spring boot 2.3.1
- 그리디
- 자료구조
- 그래프
- bfs
- programmers
- 깃
- 알고리즘
- 이것이 코딩테스트다
- dfs
- 2019 카카오 개발자 겨울 인턴십
- BOJ
- Summer/Winter Coding(~2018)
- Algorihtm
- 2020 카카오 인턴십
- repository
- DP
- Algorithm
- 정렬
- binary search
- 저장소
- 백준
- 열혈강의
- 코틀린
- Python
- Idempotent
- 단계별로 문제풀이
- OS
- git
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
글 보관함
