全部评论
//第一题 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); }
送花
回复 分享
//方块染色 public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int T = sc.nextInt(); for (int i = 0; i < T; i++) { long N = sc.nextInt(); long M = sc.nextInt(); long multi = M * N; long ans = multi; for (long j = 2; j < multi;j++){ if (multi % j == 0){ ans = j; break; } } System.out.println(ans); } } }
送花
回复 分享
![](https://uploadfiles.nowcoder.com/files/20240619/896508288_1718785943644/企业logo.png)
现代汽车中国前瞻数字研发中心
校招火热招聘中
官网直投
//数字拆分 public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); long[] res = new long[t]; for (int i = 0; i < t; i++) { long n = sc.nextInt(); res[i] = method(n); } sc.close(); for (int i = 0; i < t; i++) { System.out.println(res[i]); } } public static long method(long n) { int res = 1; if (n == 1) { return 1; } while (n >= Math.pow(2, res)) { res++; } return res; }
送花
回复 分享
四道编程 做了两题 是用C++写的
送花
回复 分享
还记得题吗 ,我有想复盘一下
送花
回复 分享
需要第几题呢?
送花
回复 分享
23号面试
送花
回复 分享
测开岗是有四道编程吗?
送花
回复 分享
题解题解!:https://blog.csdn.net/qq_38649940/article/details/108450650
送花
回复 分享
相关推荐
06-15 20:35
仲恺农业工程学院 Java 点赞 评论 收藏
分享