pass triangle problem solution