[Python] Python solution (.txt cuz output too large)[Python] Python solution (.txt cuz output too large)
📅
Friday 13th
Week 7, 2026
from datetime import date
with open("answer.txt", "w", encoding="utf-8") as f:
for year in range(1, 10000):
for month in range(1, 13):
if date(year, month, 13).weekday() == 4:
f.write(f"{year:04d}-{month:02d}-13\n")