Add solution for 1A problem B