๊ธ ์์ฑ์: caputdraconis
/*
2021 ์นด์นด์ค ์ฑ์ฉ์ฐ๊ณํ ์ธํด์ญ ์ฝ๋ฉํ
์คํธ ๋ฌธ์ ์ ๋ํ C++ ํด๊ฒฐ๋ฐฉ๋ฒ์
๋๋ค.
๋ฌธ์์ด์ ์ฌ์ฉํ๋ ๋ฌธ์ ์ด๊ธฐ์ python์ ์ฌ์ฉํ์ต๋๋ค.
*/
๋ฌธ์ ๋งํฌ
https://programmers.co.kr/learn/courses/30/lessons/81301
def solution(s):
str_arr = ["zero", "one", "two", "three", "four",
"five", "six", "seven", "eight", "nine"]
for i in range(10):
s = s.replace(arr[i], str(i))
return int(s)
python์ replace๋ฅผ ์ฌ์ฉํด ๊ฐ๋จํ๊ฒ ํด๊ฒฐํ์ต๋๋ค.