# equisum2-q16
# Sections 1-5, Q.16, p.13 and p.247
# timeit.bat equisum2.py == 2.96 msec

import time

start = time.time_ns()
count = 0
for s in range(28):
  p = 0
  for a in range(10):
    for b in range(10):
      for c in range(10):
        if a+b+c == s:
          p += 1
  count += p*p
print(count, "in", time.time_ns()-start, "nanosecs")
