| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
- LCM
- 1일1솔
- 연관관계
- DP
- Java
- 파이썬
- deque
- JPA
- 그리디 알고리즘
- 합 구하기
- 소수찾기
- 소수판별
- BFS
- pypy3
- popleft
- spring
- unity
- python3
- appendleft
- c#
- 완전탐색
- 프로그래머스
- mvc
- 우선순위큐
- 누적합
- C#강의
- 백준
- Python
- 브루투포스
- 인프런
- Today
- Total
목록전체 글 (139)
jae_coding
문제 문제 링크 코드 import sys from collections import deque input = sys.stdin.readline input_string = deque(input().strip()) count = 0 result = 0 primary_string = "" while len(input_string) != 0: temp = input_string.pop() if temp == ")": count += 1 else: if primary_string == "(": count -= 1 result += 1 else: count -= 1 result += count primary_string = temp print(result)
문제 문제 링크 코드 import sys from collections import deque input = sys.stdin.readline # 1 + 2 * 3 - 4 / 5 = 7 - 0.8 = 6.2 n = int(input()) input_string = list(input().strip()) list_num = [0] * n for i in range(n): list_num[i] = int(input()) stack = deque() for i in input_string: if 'A'
문제 문제 링크 코드 import sys from collections import deque input = sys.stdin.readline n = int(input()) stack = deque(i for i in range(1, n+1)) stack2 = deque() primary_num = 0 flag = False result = list() for _ in range(n): input_number = int(input()) temp = 0 if primary_num < input_number: flag = False else: flag = True while True: if temp != input_number and flag is False: if len(stack) != 0: temp =..