M
M
mazimuz2020-01-17 13:17:19
Python
mazimuz, 2020-01-17 13:17:19

Are there Python balls in the basket?

There are balls in the basket. If you arrange them in groups of 2, 3, 4, 5, 6, one ball remains in the basket. If you sort out 7 balls, then nothing will remain in the basket.
What is the minimum number of balls in the basket?
Question: I don't know what to do.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2020-01-17
@fox_12

Stupid brute force:

for im in range(7,1000):
    if(all([im % 2 == 1, im % 3 == 1, im % 4 == 1, im % 5 == 1, im % 6 == 1, im % 7 == 0])):
        print(im)
        break

301

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question