fork download
  1. resultList = []
  2.  
  3. for a in xrange(1,98):
  4. for b in xrange(1,98):
  5. for c in xrange(1,98):
  6. d = 100 - a - b - c
  7. if d > 0 and a <= b <= c <= d:
  8. resultList.append([a,b,c,d])
  9.  
  10. print len(resultList)
  11. print
  12. print resultList[:10]
  13. print ". . . 7133 list items elided . . ."
  14. print resultList[-10:]
Success #stdin #stdout 0.38s 9104KB
stdin
Standard input is empty
stdout
7153

[[1, 1, 1, 97], [1, 1, 2, 96], [1, 1, 3, 95], [1, 1, 4, 94], [1, 1, 5, 93], [1, 1, 6, 92], [1, 1, 7, 91], [1, 1, 8, 90], [1, 1, 9, 89], [1, 1, 10, 88]]
. . . 7133 list items elided . . .
[[23, 24, 24, 29], [23, 24, 25, 28], [23, 24, 26, 27], [23, 25, 25, 27], [23, 25, 26, 26], [24, 24, 24, 28], [24, 24, 25, 27], [24, 24, 26, 26], [24, 25, 25, 26], [25, 25, 25, 25]]