pytha triplet solved, two methods included both brute force