Increase of temperature of an ideal nondegenerate quantum gas in a suddenly expanding box due to energy quantization