https://www.acmicpc.net/problem/32154
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | def sol(rank_num): answer = {1: [11, ["A", "B", "C", "D", "E", "F", "G", "H", "J", "L", "M"]] , 2: [9, ["A", "C", "E", "F", "G", "H", "I", "L", "M"]] , 3: [9, ["A", "C", "E", "F", "G", "H", "I", "L", "M"]] , 4: [9, ["A", "B", "C", "E", "F", "G", "H", "L", "M"]] , 5: [8, ["A", "C", "E", "F", "G", "H", "L", "M"]] , 6: [8, ["A", "C", "E", "F", "G", "H", "L", "M"]] , 7: [8, ["A", "C", "E", "F", "G", "H", "L", "M"]] , 8: [8, ["A", "C", "E", "F", "G", "H", "L", "M"]] , 9: [8, ["A", "C", "E", "F", "G", "H", "L", "M"]] , 10:[8, ["A", "B", "C", "F", "G", "H", "L", "M"]]} print(answer[rank_num][0]) print(*answer[rank_num][1]) if __name__ == '__main__': rank_num = int(input()) sol(rank_num) | cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 3330. Find the Original Typed String I (0) | 2024.10.27 |
---|---|
백준 32260 A + B (0) | 2024.10.27 |
3300. Minimum Element After Replacement With Digit Sum (0) | 2024.10.05 |
leetcode 3210. Find the Encrypted String (0) | 2024.09.23 |
3194. Minimum Average of Smallest and Largest Elements (0) | 2024.09.21 |
댓글