fork(1) download
  1. ## For stack exchange question
  2. ## http://m...content-available-to-author-only...e.com/questions/2123549/how-many-five-digit-numbers-are-divisible-by-three-and-also-contain-6-as-one-of
  3.  
  4. def check(start, end):
  5. total = 0
  6. for x in range(start,end):
  7. if (x % 3 == 0) and ("6" in str(x)):
  8. total += 1
  9. return total
  10.  
  11. check(0,10**5)
Success #stdin #stdout 0.02s 9992KB
stdin
stdout
Standard output is empty