P atoms are present at the 8 corners and contribution of every corner is one-eighth. Therefore, total P atom is 1. Q is present inside the cube so number of Q atom is 1. The formula is PQ. Q atom is surrounded by 8 P atoms and vice versa. So the coordination number is 8.