Problem

Source: Romania BMO TST 1989 p1

Tags: combinatorics, Sum, number theory



Let $M$ denote the set of $m\times n$ matrices with entries in the set $\{0,1,2,3,4\}$ such that in each row and each column the sum of elements is divisible by $5$. Find the cardinality of set $M$.