일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 다이나믹프로그래밍
- ubuntu
- 자바
- 백준 2512번
- 백준 1987
- 알고리즘
- 그리디
- 백준 15787번
- 백준 1253번
- 백준 16918번
- Python
- AWS
- java_programming
- 모각코
- 백준
- 머신러닝과 딥러닝
- react
- 깃헙
- SQL
- MySQL
- 백준 17451번
- 그래프
- 백준 18310번
- 명품자바
- SWEA 15612번
- 백준 3085번
- javascript
- 다이나믹 프로그래밍
- HUFS 모각코 캠프
- 백준 1331번
Archives
- Today
- Total
목록백준 13022번 (1)
차곡차곡
[BOJ/Python] 백준 13022번 - 늑대와 올바른 단어
백준 #13022 늑대와 올바른 단어 13022번: 늑대와 올바른 단어 첫째 줄에 단어가 주어진다. 단어는 w, o, l, f로만 이루어져 있으며, 길이는 50을 넘지 않는다. www.acmicpc.net import sys input = sys.stdin.readline word = input().strip() now = 0 # 현재 문자 인덱스 next = 1 # w: 1, o: 2, l: 3, f: 4 cnt = 0 cnt2 = 0 while now < len(word): if word[now] == "w": if next == 1: while now < len(word) and word[now] == "w": cnt += 1 now += 1 next = 2 else: print(0) exit() ..
CS/Algorithm
2022. 7. 1. 18:59