문제
제출답안
import java.util.*;
class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String inputStr = sc.nextLine();
for(int i=inputStr.length()-1; i>=0; i--) {
System.out.print(inputStr.charAt(i)); // 마지막 인덱스부터 차례대로 출력
}
}
}
출처