exam problem simple solution