fork download
  1. x = 1
  2. y = 0
  3. z = 0
  4. i = 1
  5. while x < 10:
  6. if (x+y+z==20) and ((x*x + y*y + z*z) % 3==0) and ((x*x + y*y + z*z) % 9 != 0):
  7. print(x,y,z)
  8. z += 1
  9. if z == 9:
  10. y += 1
  11. z = 0
  12. if y == 9:
  13. x += 1
  14. y = 0
  15.  
Success #stdin #stdout 0.01s 27704KB
stdin
Standard input is empty
stdout
5 7 8
5 8 7
7 5 8
7 8 5
8 5 7
8 7 5