문제
10809 알파벳 찾기
답
kotlin code
import java.util.*
fun main() {
q10809()
}
fun q10809() = with(Scanner(System.`in`)) {
val input = next();
val inputs = input.toCharArray().map { it.code }
for(alphabet in 'a'.code .. 'z'.code) {
if(!inputs.contains(alphabet)) {
print("-1 ")
continue
}
for (index in inputs.indices) {
if(alphabet == inputs[index]) {
print("$index ")
break
}
}
}
}