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 |
Tags
- android
- 동적계획법과최단거리역추적
- cos pro 1급
- Algorithm
- 개발
- 코딩테스트
- DFS
- django
- DFS와BFS
- Vue
- DART
- issue
- AndroidStudio
- 코테
- 알고리즘
- 백준
- 안드로이드
- 분할정복
- 파이썬
- vuejs
- 안드로이드스튜디오
- cos pro
- Flutter
- BAEKJOON
- Python
- codingtest
- 동적계획법
- 코드품앗이
- cos
- C++
Archives
- Today
- Total
목록n번째로 작은 수 구하기 python (1)
Development Artist
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/NCZCo/btruh7RfenQ/QzoRK22PRzJBEdYMZxAGv0/img.png)
문제 유형 코딩 난이도 hard Note 1. set 알기 : 배열 원소의 중복 제거 2. itertools의 permutations : 순열을 만들어 주는 라이브러리 함수 3. 1번과 2번을 알면 쉬움. Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean import itertools def solution(card, n): answer = -1 card = list(map(str, card)) nums = list(map(''.join, itertools.permutations(card))) nums = list(set(map(int, nums))) nums.sort() for i in range(len(nums)): if n == num..
Algorithm/COS
2022. 2. 25. 13:17