第一题经典题目 第二题可以二分解决,代码见下面 import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); sc.useDelimiter("[ \n]"); int times = sc.nextInt(); System.out.println(calc(1, times)); } private static long calc(long begin, long end) { long ans = 1; if (begin - end > 10) { return calc(begin, end / 2) * calc(end / 2 + 1, end); } for (long i = begin; i <= end; i++) { long temp = i; while (temp % 10 == 0) { temp /= 10; } ans *= temp; ans %= 1_000_000_000; while (ans % 10 == 0) { ans /= 10; } } return ans % 10; } } 第三题分情况然后动态规划
点赞 评论

相关推荐

程序员花海:实习和校招简历正确格式应该是教育背景+实习+项目经历+个人评价 其中项目经历注意要体现业务 实习经历里面的业务更是要自圆其说 简历模板尽可能保持干净整洁 不要太花哨的
点赞 评论 收藏
分享
12-15 12:50
河北工程大学
sta666:我也是这个国际商业化的,三天,一天一面,就通过了,不过我是后端实习生,好好面感觉能过。
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务