4 nouveaux défis

This commit is contained in:
2022-10-09 22:21:01 +02:00
parent 3b054d370c
commit 34b88066f0
4 changed files with 86 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import datetime
days = (len("lundi"), len("mardi"), len("mercredi"), len("jeudi"), len("vendredi"), len("samedi"), len("dimanche"))
d = datetime.datetime.strptime("01/01/2000", "%d/%m/%Y")
end = datetime.datetime.now()
ctr = 0
while True:
if (days[d.weekday()] + d.day)%10 == 0:
ctr += 1
d = d + datetime.timedelta(days=1)
if d > end:
break
print(d, ctr)