# JUNTO Practice: Project Euler Problem 1

Discussed on September 18, 2018.

## Solutions

Click to see:

### Oscar Martinez

```
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 6 12:16:50 2018
@author: omartinez
"""
#%% JUNTO Practice Problem 3
# We want to find the sum of the multiples of 3 or 5 in a range, [1,N)
# In this case N is 1000, range is [1,1000)
# We opt to store the values in an array and then sum them,
# in case we wanted to list the numbers
# Start with empty array
arr_multiples = []
# Loop through [1,1000)
# Check if remainder is 0, the number is a multiple and we store it
for i in range(1, 1000):
if i % 3 == 0 or i % 5 == 0:
arr_multiples.append(i)
arr_multiples
sum(arr_multiples)
```

### John Lekberg

```
sum(i for i in range(1000) if not (i % 5 and i % 3))
```

### Daniel Bassett

```
sum({*range(3, 1000, 3)} | {*range(5, 1000, 5)})
```