If n4≥5, then n4! contains the prime factors 2 and 5. Therefore,
z=n1!n2!n3!n4!−32≡0−32≡8(mod10)
However, (10a+b)2≡b2(mod10) holds for a;b∈N. If b=0;1;2;3;4;5;6;7;8;9, then b2≡ 0;1;4;9;6;5;6;9;4;1(mod10).
In no case does b2≡8(mod10) hold. Therefore, n4≤4. Thus, initially, only the following five quadruples are possible:
(0;1;2;3),(0;1;2;4),(0;1;3;4),(0;2;3;4),(1;2;3;4)
Testing reveals that the first and third quadruples are invalid. Therefore, the solution set contains three elements: (0;1;2;4),(0;2;3;4), and (1;2;3;4).