Notice
Recent Posts
Recent Comments
Link
| ์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
|---|---|---|---|---|---|---|
| 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
- fe
- ํ์ด์ฌ
- CSS
- error
- ์๊ณ ๋ฆฌ์ฆ
- ํฌ๋กค๋ง
- ํ๋ก๊ทธ๋๋จธ์ค
- ์ฝ๋ฉํ ์คํธ
- ๊ทธ๋ฆฌ๋
- javascript
- ์ฝ๋ฉ์ ํ
- KDT
- ๊ฐ๋ฐ
- react
- HTML
- mongodb
- ๋ฐฑ์ค
- Til
- heapq
- node.js
- ๊ตญ๋น์ง์
- ํ๋ก ํธ์๋
- ์ฝ๋ฉ
- ํ ์ดํ๋ก์ ํธ
- JS
- Python
- ๋ ธ๋ง๋์ฝ๋
- ํ๋ก์ ํธ
- ๋ชจ๊ฐ์ฝ
- ๋๋ฆผ์ฝ๋ฉ
Archives
- Today
- Total
๐ฑ → ๐ณ
[ํ๋ก๊ทธ๋๋จธ์ค] ๋ชจ์์ฌ์ - python ๋ณธ๋ฌธ
728x90
https://school.programmers.co.kr/learn/courses/30/lessons/84512
ํ๋ก๊ทธ๋๋จธ์ค
์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์.
programmers.co.kr
from itertools import product
def solution(word):
ls = []
for i in range(1, 6):
for j in list(product('AEIOU', repeat=i)):
ls.append(''.join(j))
ls.sort()
return ls.index(word) + 1
728x90
'Algorithms' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [Baekjoon] 25421. ์กฐ๊ฑด์ ๋ง๋ ์ ์์ ๊ฐ์ - python (0) | 2023.09.28 |
|---|---|
| [ํ๋ก๊ทธ๋๋จธ์ค] ์์ - python (0) | 2023.09.28 |
| [ํ๋ก๊ทธ๋๋จธ์ค] ํฐ ์ ๋ง๋ค๊ธฐ - python (0) | 2023.09.15 |
| [ํ๋ก๊ทธ๋๋จธ์ค] ์จ์ด ์๋ ์ซ์์ ๋ง์ - python (0) | 2023.09.15 |
| [Baekjoon] 11718. ๊ทธ๋๋ก ์ถ๋ ฅํ๊ธฐ - python (0) | 2023.09.14 |