2026.06.06 6666666

复制代码
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;


/**
 * 趣味数学   2026.06.06
 * 
 * 
 * @author ZengWenFeng
 * @date 2026.06.06
 * @mobile 13805029595
 * @email 117791303@QQ.com
 */
public class DateFind20260606_3
{
	public static int getWeekNum(DayOfWeek w)
	{
		return w.getValue();
	}

	public static void main(String[] args)
	{
		int start = 2026;
		int end = 9999;
		List<String> res = new ArrayList<>();

		for (int y = start; y <= end; y++)
		{
			int k = y % 10;
			// k只能1~7,0、8、9直接跳过
			if (k < 1 || k > 7)
			{
				continue;
			}
			int month = k;
			int day = k;
			try
			{
				LocalDate date = LocalDate.of(y, month, day);
				int weekNo = getWeekNum(date.getDayOfWeek());
				if (weekNo == k)
				{
					res.add(y + "年" + month + "月" + day + "日 | 星期" + weekNo + ",年末位:" + k);
				}
			}
			catch (Exception ignored)
			{
				// 不存在的日期自动跳过
			}
		}
		// 全部输出
		res.forEach(System.out::println);
	}
}
相关推荐
spencer_tseng13 小时前
a^2 - b^2 = 1573
math·homework
spencer_tseng7 天前
7th grade math (2026.05.30)
math·homework
spencer_tseng8 天前
7th grade math (2026.05.29) [Linear equation in three variables]
math·homework
spencer_tseng22 天前
7th grade math (2026.05.15)Binary Linear Equation Group
math
spencer_tseng1 个月前
math 7 (2026.05.10)
math·homework
spencer_tseng1 个月前
math 9 (zhejiang)
math·homework
spencer_tseng3 个月前
Count the matches 13805029595
math·homework
爱听歌的周童鞋3 个月前
斯坦福大学 | CS336 | 从零开始构建语言模型 | Spring 2025 | 笔记 | Assignment 5: SFT Implement
llm·sft·math·assignment·cs336·expertiteration
Physicist in Geophy.4 个月前
从矩阵到函数(算子理论)
矩阵·math