these seem more like math problems than programming exercises...