Assignment 10 - Task 1.4

Kamuna
Neuling
Neuling
Beiträge: 9
Registriert: 5. Nov 2014 07:05

Assignment 10 - Task 1.4

Beitrag von Kamuna » 23. Jan 2018 14:47

Hello,

Could it be that the test for the task 1.4 is wrong? The test demands that the result list contains a 1. My solution would not contain a 1 because it can not be expressed as a multiplication of 2, 3 or 5.

Chris

Kamuna
Neuling
Neuling
Beiträge: 9
Registriert: 5. Nov 2014 07:05

Re: Assignment 10 - Task 1.4

Beitrag von Kamuna » 23. Jan 2018 14:55

I just realized that I understood the task completely wrong ... sorry..

VSchü
Windoof-User
Windoof-User
Beiträge: 26
Registriert: 5. Jul 2015 16:46

Re: Assignment 10 - Task 1.4

Beitrag von VSchü » 25. Jan 2018 16:44

Could you share some of your insight? Why should 1 be included when it can not be written as a product of 2, 3 and 5?

0b101101101
Endlosschleifenbastler
Endlosschleifenbastler
Beiträge: 179
Registriert: 15. Apr 2015 18:24

Re: Assignment 10 - Task 1.4

Beitrag von 0b101101101 » 25. Jan 2018 16:54

Well, it seems one should start with 1, regardless of its prime factors, no? :)
It probably helps for the recursive definition, too.

a10r
Erstie
Erstie
Beiträge: 11
Registriert: 4. Nov 2012 13:53

Re: Assignment 10 - Task 1.4

Beitrag von a10r » 25. Jan 2018 17:51

VSchü hat geschrieben:
25. Jan 2018 16:44
Could you share some of your insight? Why should 1 be included when it can not be written as a product of 2, 3 and 5?
This had me confused for quite some time as well. 1 belongs to the list because 1 actually has no prime factors at all. Or in other words, an empty product is 1. So if we take zero 2s, zero 3s and zero 5s, we get a product of 1.

Antworten

Zurück zu „Archiv“