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
- 동적계획법
- cos pro 1급
- C++
- 안드로이드
- 개발
- 동적계획법과최단거리역추적
- vuejs
- DART
- DFS
- 파이썬
- 코테
- Algorithm
- issue
- Python
- 코딩테스트
- 분할정복
- cos
- DFS와BFS
- codingtest
- 안드로이드스튜디오
- Flutter
- 백준
- BAEKJOON
- AndroidStudio
- django
- Vue
- 알고리즘
Archives
- Today
- Total
목록cos 1급 4차 8번 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