본문 바로가기
Algorithm/BFS, DFS

[백준] 10809번 알파벳 찾기

by 등촌동 꼬북이 2020. 9. 4.

쉬운 문제

 

ans = [ -1 for i in range(26) ]
x = input()
for i in range(len(x)):
    if ans[ord(x[i])- 97] == -1:
        ans[ord(x[i])- 97] = i

for i in range(len(ans)):
    print(ans[i], end=' ')

'Algorithm > BFS, DFS' 카테고리의 다른 글

[백준] 2644번 촌수계산  (0) 2020.09.08
[백준] 1926번 그림  (0) 2020.09.07
[백준] 단어 공부  (0) 2020.09.04
[백준] 2675 문자열 반복  (0) 2020.09.04
[백준] 1260번 DFS와 BFS  (0) 2020.09.04

댓글