The surface atmospheric pressure is 14.7 pounds per square inch or 1.01 x 10^5 newtons per square meter. Multiply either of these by the surface area (using the appropriate units for the area) and you get the total weight of the atmosphere. For instance, there are 1.55 x 10^9 in² per km², so 14.7 lbs/in² = 2.28 x 10^9 lbs/km². Multiply this by the surface area pf 516 x 10^6 km² and you get 1.19 x 10^19 lbs.
If we assume that the gravitational acceleration (g) is constant over the bulk of the mass of the Earth's atmosphere, we can calculate the mass of the atmosphere that would have this weight, i.e., 1 lb-force = 1 lb-mass = 0.454 kg. The mass of the atmosphere is then 5.33 x 10^18 kg.
One tonne = 10^3 kg, and the question asks for the answer in units of 10^12 tonnes = 10^15 kg. The mass of the atmosphere is therefore 5.33 x 10^3 tonnes