#!/usr/bin/python

with open('day3_input.txt') as f: #'day3_input.txt' contains the input
    lines = f.readlines()

numPossibleTriangles = 0

for line in lines:
	numbers = line.split() #split the line across any whitespace 
	
	if int(numbers[0]) + int(numbers[1]) > int(numbers[2]) and \
		int(numbers[1]) + int(numbers[2]) > int(numbers[0]) and \
		int(numbers[0]) + int(numbers[2]) > int(numbers[1]):
		numPossibleTriangles += 1

print("Number of possible triangles = " + str(numPossibleTriangles))
c74c035b4fe2d1a565733c95a8386f3e9d49f6ad
<mask token>

with open('day3_input.txt') as f:
    lines = f.readlines()
<mask token>
for line in lines:
    numbers = line.split()
    if int(numbers[0]) + int(numbers[1]) > int(numbers[2]) and int(numbers[1]
        ) + int(numbers[2]) > int(numbers[0]) and int(numbers[0]) + int(numbers
        [2]) > int(numbers[1]):
        numPossibleTriangles += 1
print('Number of possible triangles = ' + str(numPossibleTriangles))

with open('day3_input.txt') as f:
    lines = f.readlines()
numPossibleTriangles = 0
for line in lines:
    numbers = line.split()
    if int(numbers[0]) + int(numbers[1]) > int(numbers[2]) and int(numbers[1]
        ) + int(numbers[2]) > int(numbers[0]) and int(numbers[0]) + int(numbers
        [2]) > int(numbers[1]):
        numPossibleTriangles += 1
print('Number of possible triangles = ' + str(numPossibleTriangles))

#!/usr/bin/python

with open('day3_input.txt') as f: #'day3_input.txt' contains the input
    lines = f.readlines()

numPossibleTriangles = 0

for line in lines:
	numbers = line.split() #split the line across any whitespace 
	
	if int(numbers[0]) + int(numbers[1]) > int(numbers[2]) and \
		int(numbers[1]) + int(numbers[2]) > int(numbers[0]) and \
		int(numbers[0]) + int(numbers[2]) > int(numbers[1]):
		numPossibleTriangles += 1

print("Number of possible triangles = " + str(numPossibleTriangles))