일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- nullpointerexception방지
- 자바리스트정렬
- Python
- 문자열
- 자바set
- 프로그래머스
- 백준파이썬
- 배열
- Hilt
- 파이썬
- composelifecycle
- 파이썬문법
- 자바
- 리스트
- Java
- Dependency
- programmers
- 티스토리챌린지
- android
- 자료형
- jetpack
- list
- Provider
- 오블완
- 백준
- disposableeffect
- Kotlin
- filternotnull()
- compose
- ContentProvider
Archives
- Today
- Total
목록python dictionary (1)
study gomi

내 제출 - 네 번을 틀렸다. 그것도 다 같은 이유(시간 초과)로... - 딕셔너리로 풀었다(dict 참고 : https://taetaegom.tistory.com/18) import sys n, m = map(int, sys.stdin.readline().rstrip().split()) word_dict = {} for _ in range(n): word = sys.stdin.readline().rstrip() if len(word) < m: continue else: if word in word_dict: word_dict[word] += 1 else: word_dict[word] = 1 word_dict = sorted(word_dict.items(), key=lambda x: (-x[1], -le..
Practice/Baekjoon
2024. 1. 30. 00:46