In many carbohydrates, the ratio of carbon atoms to hydrogen atoms to oxygen atoms is 1:2:1. If a specific carbohydrate has 10 carbon atoms in its molecular formula, how many hydrogen atoms and oxygen atoms are in the compound?