내 답안
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next();
int len = a.length();
for(int i=0; i<len; i++){
System.out.println(a.charAt(i));
}
}
}
Java
복사
다른 사람 풀이법
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.next();
for (char ch : a.toCharArray())
System.out.println(ch);
}
}
Java
복사