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 | 29 | 30 |
Tags
- JS
- ํ๋ก๊ทธ๋๋จธ์ค
- Python
- mongodb
- ์ฝ๋ฉํ ์คํธ
- node.js
- ํ ์ดํ๋ก์ ํธ
- heapq
- javascript
- ๊ฐ๋ฐ
- ๊ตญ๋น์ง์
- ํฌ๋กค๋ง
- error
- Til
- ํ๋ก์ ํธ
- CSS
- ๋ ธ๋ง๋์ฝ๋
- ๊ทธ๋ฆฌ๋
- ํ๋ก ํธ์๋
- ๋๋ฆผ์ฝ๋ฉ
- ์ฝ๋ฉ์ ํ
- KDT
- ํ์ด์ฌ
- ๋ชจ๊ฐ์ฝ
- ์๊ณ ๋ฆฌ์ฆ
- react
- ๋ฐฑ์ค
- HTML
- ์ฝ๋ฉ
- fe
Archives
- Today
- Total
๐ฑ → ๐ณ
[๋ฐฑ์ค] 5622๋ฒ: ๋ค์ด์ผ python ๋ณธ๋ฌธ
728x90
https://www.acmicpc.net/problem/5622
์ ๋ต ์ฝ๋:
dial = ['ABC','DEF','GHI','JKL','MNO','PQRS','TUV','WXYZ']
word = input()
time = 0
for i in word:
for j in dial:
if i in j:
time += dial.index(j)+3
print(time)
dial = ['ABC','DEF','GHI','JKL','MNO','PQRS','TUV','WXYZ']
์ด๋ ๊ฒ ๋์ด์์ผ๋ฉด 'ABC'๋ฅผ ํ ๋ฉ์ด๋ฆฌ(๋จ์ด)๋ก ์๊ฐํด์ A์ ๋น๊ตํ๊ฑฐ๋ ์ด๋ ๊ฒ๋ ๋ถ๊ฐ๋ฅ ํ ์ค ์์๋๋ฐ
๊ฐ๋ฅํ๊ตฌ๋
728x90
'Algorithms' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค] 2869๋ฒ: ๋ฌํฝ์ด๋ ์ฌ๋ผ๊ฐ๊ณ ์ถ๋ค python (0) | 2022.07.17 |
---|---|
[๋ฐฑ์ค] 1193๋ฒ: ๋ถ์์ฐพ๊ธฐ python (0) | 2022.07.17 |
[๋ฐฑ์ค] 1152๋ฒ: ๋จ์ด์ ๊ฐ์ python (0) | 2022.07.15 |
[๋ฐฑ์ค] 1157๋ฒ: ๋จ์ด ๊ณต๋ถ python (0) | 2022.07.15 |
[๋ฐฑ์ค] 2675๋ฒ: ๋ฌธ์์ด ๋ฐ๋ณต python (0) | 2022.07.15 |