Let $S$ be the set of all positive integers less than $10,000$ whose last four digits in base $2$ are the same as its last four digits in base $5$. What remainder do we get if we divide the sum of all elements of $S$ by $10000$?
Problem
Source: 2019 Dürer Math Competition Finals Day2 E+14 https://artofproblemsolving.com/community/c1621835_2019_
Tags: number theory, last digits, Digits