Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- vuejs
- 코드품앗이
- DFS
- django
- DFS와BFS
- cos
- cos pro 1급
- issue
- 분할정복
- C++
- Python
- codingtest
- 동적계획법
- cos pro
- 코딩테스트
- DART
- android
- Flutter
- 코테
- 동적계획법과최단거리역추적
- docker
- 개발
- 파이썬
- 알고리즘
- 안드로이드스튜디오
- BAEKJOON
- Algorithm
- AndroidStudio
- 안드로이드
- 백준
Archives
- Today
- Total
목록문자열 압축 python (1)
Development Artist

문제 유형 한줄 수정 난이도 normal Note 1. 2차 10번 0들을 0으로 만들기와 로직 유사. 차이점 찾기(previous) Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean # 4차 2번 def solution(s): s = s.lower() answer = "" previous = s[0] counter = 1 for alphabet in s[1:]: if alphabet == previous: counter += 1 else: answer += previous + str(counter) counter = 1 previous = alphabet answer += previous + str(counter) return answer..
Algorithm/COS
2022. 2. 25. 12:56