solve P46,47