The following question is considered: Which sets of k lattice points among the nd points in a d‐dimensional cube of length n maximize the number of pairs of points differing in only one coordinate? It is shown that maximal configurations for any (d, n, k) are obtained by choosing the first k points in a lexicographic ordering of the points by coordinates. Some possible generalizations of the problem are discussed.