Problem

Source: 2018 Pan-African Shortlist - N2

Tags: number theory, Divisibility, Digits



A positive integer is called special if its digits can be arranged to form an integer divisible by $4$. How many of the integers from $1$ to $2018$ are special?