# Calculating edge length of a cube atom

This question comes straight from a worksheet we were assigned in chemistry, though it’s more math focused of a question I hope that this is an appropriate question to ask here.

Calculate the edge length of a cube containing an Avogadro’s number ($6.02 \times 10^{23}$) of hydrogen atoms stacked to form a cube. Assume a hydrogen atom is equivalent to a tiny cube with edge length $\mathrm{1\times 10^{-10}\ m}$.

I calculated this two ways getting different answers for both.

First: I found the length of stacking these cubes in a straight line. $\mathrm{((6.02\times 10^{23})\times(1\times10^{-10}) = 6.02\times10^{13}\ m)}$ Next I took the cube root of this thinking that it would be edge length of a cube just as a square root would give the edge length of a square? $\mathrm{( = 39192.1267 \space m )}$

Second: I took the edge length of the hydrogen atom and cubed it, thinking that the volume of each atom would be useful, and multiplied it by the number of atoms. $((6.02\times 10^{23})(1\times 10^{-30}) = 6.02\times 10^{-7})$ So here I thought that I had the volume for the entire cube or at least I think. Now to get the length of a single edge we take a cube root of this number? $\mathrm{( = 0.0084\ m )}$

Sorry it’s long winded but couldn’t find anything to shed any light on this question, and thank you for your time.