Calculate deviations in exercise A and exercise B.