Problem 1-5 , probably with fastest solutions