Day 2: Complete Problems P10 to P12

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>