[백준/Python] 10828번 : 스택
문제
https://www.acmicpc.net/problem/10828
스택 자료구조 문제
풀이
Python의 list 타입을 활용, 내장된 함수들을 통해 쉽게 풀 수 있는 문제다. 문제를 꼼꼼하게 읽지 않아 처음에 시간 초과가 발생하여 sys.readline()을 통해 input을 처리하였다.
if - elif문을 선호하지 않아서 if문과 continue를 통해서 input case를 분기하여 처리했다.
import sys
input ...
studio-pendant.hashnode.dev1 min read