题解 | #数字颠倒#

数字颠倒

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

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String in = sc.next();
        StringBuilder sb = new StringBuilder();
        for (int i = in.length() - 1; i >= 0; i--) {
            sb.append(in.charAt(i));
        }
        System.out.println(sb);
    }
}

#java刷题#
全部评论

相关推荐

2025-12-31 14:31
湖南科技大学 Web前端
是阿亮吖:一个是这个时间招人比较少,另一个是沟通太少了。六十多份太养生了,最起码沟通个五六百份吧
点赞 评论 收藏
分享
2025-12-05 19:18
已编辑
门头沟学院 Java
化尽纤尘:hr挂了,这公司迟早倒闭,技术人员不注重技术在那里搞服从性测试,必须满足它那**思想,钱也给的不多还要“自主学习”
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务