본문 바로가기
python-algorithm

[백준] 10809

by 무적김두칠 2021. 1. 11.

1
2
3
4
5
6
7
s=input()
ans=[-1]*26
for i in range(len(s)):
     if  ans[ord (s[i])-97== -1 : ans[ord (s[i])-97]=i
print(ans[0],end='')
for i in range(1,26):
     print (" %d"%ans[i],end='')
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 10811  (0) 2021.01.11
[백준] 10810  (0) 2021.01.11
[백준] 10808  (0) 2021.01.11
[백준] 10807  (0) 2021.01.11
[백준] 10275  (0) 2021.01.11

댓글