fork download
  1. s = int(input())
  2.  
  3. for i in range(s):
  4. w = input().split()
  5.  
  6. li = []
  7. for j in range(1, int(w[0])):
  8. if (int(j) % int(w[1]) == 0) and (int(j) % int(w[2]) != 0):
  9. li.append((j))
  10.  
  11. ' '.join(li)
  12.  
  13.  
  14.  
Runtime error #stdin #stdout 0.02s 5864KB
stdin
2 
7 2 4
35 5 12
stdout
Standard output is empty