The total of n integers will have a remainder of either 0, 1, …, (n-1) modulo n. This means the possible fractionals parts for the average are just: 0, 1/n, 2/n, 3/n, …, (n-1)/n.
E.g. If 1 subject: only can have decimal of 0.
If 2 subjects: only can have 0 or 0.5.
If 3 subjects: 0, 0.333..., or 0.666...,
If 4 subjects: 0, 0.25, 0.5, or 0.75.
Etc.
So a fractional part of 0.25 for instance means the no. of subjects must have been 4 (or something divisible by 4).
(Assumption: weights in average are equal.)