var a = [
]{x: 1, y: 2, z: 3},
{x: 1, y: 2, z: 4},
{x: 1, y: 1, z: 0},
{x: 1, y: 2, z: 3}
]
when the values of y in array an are the same as the sum of the same value z
example: a has three y with the same z sum of 3"4"3? Find the optimal solution