Algorithm알파벳 찾기problem number: 10809link: https://www.acmicpc.net/problem/10809Define input, outputInput: 소문자로 이루어진 단어 SOutput: 각 알파벳이 처음 나온 위치source code 1 2 3 4 5 6 7 8 9 10 11 import sys S = sys.stdin.readline().strip() result = [-1] * (ord("z") - ord("a") + 1) for i, string in enumerate(S): if result[ord(string) - ord("a")] == -1: result[ord(string) - ord("a")] = i print(*result)