OJ-----字符逆序

来源:互联网 发布:为什么会被`淘宝管控 编辑:程序博客网 时间:2024/06/10 21:41

样例输入I am a student样例输出tneduts a ma I

import java.util.*;public class Main{public static void main(String[] args){Scanner sc=new Scanner(System.in);while(sc.hasNext()){StringBuffer sb=new StringBuffer(sc.nextLine());System.out.print(sb.reverse());}sc.close();}}



0 0
原创粉丝点击