Concept:
In a cubic close packed (ccp) or face-centered cubic (fcc) arrangement:
• If the number of close packed atoms is \(N\),
• The number of octahedral voids present is also \(N\).
Thus,
\[
\text{Number of octahedral voids} = \text{Number of atoms in ccp}
\]
Step 1: Assume the number of atoms of \(Y\).
Let the number of atoms of \(Y\) forming the ccp structure be
\[
N
\]
Step 2: Determine the number of octahedral voids.
In a ccp structure,
\[
\text{Number of octahedral voids} = N
\]
Step 3: Determine the number of atoms of \(X\).
Since element \(X\) occupies all octahedral voids,
\[
\text{Number of atoms of } X = N
\]
Step 4: Find the ratio of \(X\) and \(Y\).
\[
X : Y = N : N = 1 : 1
\]
Therefore, the formula of the compound is
\[
\boxed{XY}
\]