added solution of problem #1