Algorithm
백준 문자열 27866
hyunjun's developing 🏣
2023. 8. 24. 17:13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String st = sc.next(); int n = sc.nextInt()-1; //chatAt은 0부터 시작하기 때문에 1을 빼줘야 한다. System.out.println(st.charAt(n)); sc.close(); } } | cs |