9 lines
175 B
Python

m = 166
while 1:
five = m * (3 * m - 1)
n = int(five ** 0.5)
if five == n * (n + 1) and n % 2 == 1:
break
m += 1
print m, (n + 1) / 2, m * (3 * m - 1) / 2