fork download
  1. i=int(input())
  2. while i>0:
  3. n=int(input())
  4. pierwotna=n
  5. while n%2!=0 or n%3!=0 or n%5!=0 or n==pierwotna:
  6. n=n+1
  7. print(n)
  8. i=i-1
Success #stdin #stdout 0.12s 14144KB
stdin
4
1
56
178
21
stdout
30
60
180
30