<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 From Eric Veneto, mathematical madmen are on the loose
Step1:  How many attacks will happen between the beginning of 2001 and the end of 2099
Step2:  What year will see the most vandalism?
Step3:  The least?
Step4:  What will be the longest gap between attacks?
<ASSISTANT_TASK:>
Python Code:
import datetime
from collections import Counter
start = datetime.date(2001, 1, 1)
end = datetime.date(2100, 1, 1) - datetime.timedelta(days=1)
d = start
anarchy_dates = []
delta = datetime.timedelta(days=1)
while d <= end:
    if d.day * d.month == d.year % 100:
        anarchy_dates.append(d)
    d += delta
    
anarchy_dates.sort()
Explanation: From Eric Veneto, mathematical madmen are on the loose:
The year is 2000, and an arithmetical anarchist group has an idea. For the next 100 years, it will vandalize a famous landmark whenever the year (in two-digit form, for example this year is “18”) is the product of the month and date (i.e. month × date = year, in the MM/DD/YY format).
https://fivethirtyeight.com/features/when-will-the-arithmetic-anarchists-attack/
End of explanation
len(anarchy_dates)
Explanation: How many attacks will happen between the beginning of 2001 and the end of 2099
End of explanation
date_counts = Counter(d.year for d in anarchy_dates)
_, max_attacks = date_counts.most_common()[0]
_, min_attacks = date_counts.most_common()[-1]
for year, attacks in date_counts.items():
    if attacks == max_attacks:
        print(f'{attacks} attacks in year {year}')
Explanation: What year will see the most vandalism?
End of explanation
for year, attacks in date_counts.items():
    if attacks == min_attacks:
        print(f'{attacks} attacks in year {year}')
Explanation: The least?
End of explanation
gaps = [this-previous for this,previous in zip(anarchy_dates[1:], anarchy_dates)]
max_gap = max(gaps)
for i, gap in enumerate(gaps):
    if gap == max_gap:
        print(f'{gap.days} days between {anarchy_dates[i-1]} and {anarchy_dates[i]}')
Explanation: What will be the longest gap between attacks?
End of explanation
<END_TASK>