solution to 2009/roundC/problemB and start on problemC