- import java.util.Scanner;
- public class Test4 {
- public static void main(String[] args) {
- Scanner sc=new Scanner(System.in);
- String str=sc.nextLine();
- StringBuilder sb=new StringBuilder(str).reverse();
- StringBuilder sb1=new StringBuilder(str).append(sb.substring(1));
- System.out.println(sb1);
- }
- }
复制代码 |