行业知识
日期差值的计算
2026-11-18 11:46:17
来源:互联网转载
1、枚举所有数值进行日期判断
���间复杂度是o(n)的,比较慢,单实例能凑合用,多实例的话时间复杂度有点高。
()核心代码就是判断某个八位数能否表示一个日期。
static int[] month = {0,31,28,31,30,31,30,31,31,30,31,30,31}; static String a, b; static void sovle() throws Exception {b = br.readLine();int s = 0;int l = Integer.parseInt(a), r = Integer.parseInt(b);for(int i = l; i 12 || c
上一篇:移动云主机安全介绍图怎么看