fork download
  1. import random
  2.  
  3. # Efetua 1000 testes:
  4. for _ in range(1000):
  5.  
  6. # Gera um conjunto de 10 números inteiros entre 0 e 9:
  7. a = set(random.randint(0, 9) for __ in range(10))
  8.  
  9. # Verifica se o conjunto é igual à sua respectiva lista sortida:
  10. if list(a) != sorted(a):
  11.  
  12. # Se for diferente, exibe o conjunto:
  13. print(a)
Success #stdin #stdout 0.03s 37144KB
stdin
Standard input is empty
stdout
{8, 0, 2, 3, 4}
{9, 2, 3, 1, 7}
{8, 1, 3, 5, 7}
{1, 3, 5, 9, 7}
{9, 4, 5, 1, 6}
{8, 9, 5, 1, 7}
{8, 1, 4, 5, 9}
{8, 1, 2, 9, 0}
{8, 9, 5, 0, 1}
{0, 9, 3, 4, 6}
{8, 1, 7, 6, 9}
{8, 9, 2, 6, 7}
{0, 1, 2, 8, 7}
{8, 1, 3, 5, 9}
{0, 9, 2, 8, 6}
{8, 0, 2, 4, 5}
{0, 1, 6, 9, 7}
{8, 2, 4, 5, 6}
{8, 1, 4, 9, 7}
{9, 2, 4, 1, 7}
{0, 9, 2, 4, 1}
{8, 9, 2, 4, 7}
{0, 8, 2, 3, 6}
{8, 1, 3, 5, 0}
{8, 9, 2, 4, 6}
{8, 1, 2, 4, 7}
{8, 9, 2, 4, 7}
{1, 9, 6, 7}
{0, 9, 5, 6, 7}
{0, 9, 2, 3, 6}
{8, 9, 3, 4, 7}
{8, 1, 4, 6}
{8, 1, 3, 5, 9}
{0, 8, 3, 6, 1}
{8, 0, 2, 5, 6}
{0, 9, 4, 5, 1}
{0, 9, 2, 3, 7}
{8, 9, 3, 4, 1}
{8, 9, 2, 6, 7}
{8, 9, 5, 6, 7}
{8, 0, 4, 9, 7}
{0, 1, 2, 9, 7}
{8, 3, 4, 5, 7}
{8, 9, 2, 3, 7}
{9, 2, 4, 6, 7}
{9, 2, 4, 6, 7}
{8, 9, 2, 3, 1}
{9, 2, 3, 6, 7}
{0, 9, 6, 7}
{8, 3, 4, 6, 7}
{8, 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