If P is a three digit number where first digit is three times the last digit and no digit is repeate