Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
Tags
- 공공데이터 포털
- 개발
- 훈수 가능
- 드림핵
- apk 빌드
- python
- 부산 맛집 OPEN API
- 새로고침
- 프로그래머스
- 꿀팁 환영
- 블로그 뉴비
- redux state값 유지
- Redux
- 티스토리챌린지
- php-1
- web-view
- react-router-dom
- url 랜더링
- React
- API 활용 신청
- 창업 300
- 사업계획서
- 보안
- 고고학 최고의 발견
- expo
- level3
- 코딩테스트
- Dreamhack
- 오블완
Archives
- Today
- Total
1223v
[BOJ] Python 백준 카드 문자열(13417) 본문
https://www.acmicpc.net/problem/13417
문자열 그리디 문제이다.
# https://www.acmicpc.net/problem/13417
import sys
input = sys.stdin.readline
TC = int(input())
for _ in range(TC):
N = int(input())
s = list(map(str,input().split()))
result = s.pop(0)
while s:
tmp = s.pop(0)
if tmp > result[0]:
result = result + tmp
else:
result = tmp + result
print(result)
회고,
문제를 잘읽자...
728x90
'PS' 카테고리의 다른 글
[BOJ] Python 백준 밤양갱(31926) (0) | 2024.11.13 |
---|---|
[BOJ] Python 백준 게임을 만든 동준이(2847) (0) | 2024.11.12 |
[BOJ] Python 백준 토마토(7569) (2) | 2024.11.10 |
[BOJ] Python 백준 Yes or yes(25195) (0) | 2024.11.08 |
[BOJ] Python 백준 특정 거리의 도시 찾기(18352) (0) | 2024.11.07 |