๐Ÿ•ธ Algorithm/๐Ÿ•ธ ๋ฐฑ์ค€ BaekJoon

[๋ฐฑ์ค€][java][10809][์•ŒํŒŒ๋ฒณ ์ฐพ๊ธฐ]

๋‰ด์ด NUEY 2024. 1. 26. 22:59
๋ฐ˜์‘ํ˜•

import java.util.Scanner;

// 10809	์•ŒํŒŒ๋ฒณ ์ฐพ๊ธฐ
public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		String word = in.next();
		in.close();
		
		for (char i = 'a'; i <= 'z'; i++) {
			System.out.printf("%d ", word.indexOf(i));
		}
	}
}

 

๋ฐ˜์‘ํ˜•