Step 1: Understanding the Concept
In ccp, if there are \(N\) atoms of the anion, there are \(N\) octahedral voids.
Step 2: Count the Atoms
Anions Y: \(N\).
Cations X occupy all octahedral voids: \(N\).
Step 3: Ratio
\(\text{X} : \text{Y} = N : N = 1 : 1\), so the formula is \(\text{XY}\), option (D).
Final Answer:
The formula of the compound is XY.
\[ \boxed{\text{(D) }\text{XY}} \]