Euler48 and servicelane problem hackerrank