Ответсообщение недоступно
You know, sets enforce uniqueness of their contents. Therefore, each element has to be assign different hash code. For example, say, a set already has 1 assigned a hash code abCgh(I fabricated this), the set will not take in another 1 because it will silently ignore the copy operation when it finds out that 1 already exists in the set.
This uniqueness is implemented by some languages behind the scene using hash function.