flowkater prob_34 solve python ruby