题解 | #HJ106 字符逆序#

字符逆序

https://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {
            String s = in.nextLine();
            StringBuffer sb = new StringBuffer(s);
            System.out.println(sb.reverse());
        }
    }
}

全部评论

相关推荐

刘湘_passion:出国旅游?那就小心你的腰子咯
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务