Guest User

Untitled

a guest
Jan 4th, 2019
100
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. existing_nums = []
  2. tuples = []
  3.  
  4. duplicates = 0
  5.  
  6. n = 10
  7.  
  8. switch = True
  9.  
  10. counter = 0
  11. for i in range(1,n):
  12. for j in range(1,n):
  13. for k in range(1,n):
  14. if set([i,j,k]) not in tuples:
  15. tuples.append(set([i,j,k]))
  16. if i != j != k and i != k != j:
  17. num = i * j * k
  18. if num in existing_nums:
  19. duplicates += 1
  20. else:
  21. print(i,j,k)
  22. existing_nums.append(num)
  23. counter += 1
  24. else:
  25. pass
  26.  
  27.  
  28. print(duplicates)
  29. print(existing_nums)
  30. print(counter)
RAW Paste Data