//第一题 public static void main(String[] args) { Scanner sc = new Scanner(System.in); int len = sc.nextInt(); String str = sc.next(); sc.close(); if (len < 2){ System.out.println(0); } int left = 0; int right = len - 1; int res = 0; while (left < right){ if (str.charAt(left) != str.charAt(right)){ res++; } left++; right--; } System.out.println(res); }

相关推荐

无一技之长怎么办:别去右边,售前,实施,需求分析一起,这是把人当牛马用啊,快跑,这些岗位天花板很低的
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
03-10 14:27
已编辑
点赞 评论 收藏
分享
牛客网
牛客企业服务