Ad
Mathematics
Algorithms
Logic
Numbers
Fundamentals
Data Types
Code
Diff
  • compute=lambda n:sum([i for i in range(n)if i%3==0 or i%5==0])
    • compute = lambda n: sum(set([x for x in range(0, n, 3)] + [x for x in range(0, n, 5)]))
    • compute=lambda n:sum([i for i in range(n)if i%3==0 or i%5==0])