update format of problem 005
solve problem 004