Ex. 5, Task 4/5: comb235

Benutzeravatar
sproksch
Computerversteher
Computerversteher
Beiträge: 346
Registriert: 15. Apr 2004 17:56

Ex. 5, Task 4/5: comb235

Beitrag von sproksch »

(Separated from orginal thread for the sake of readabilty and not mixing all tasks in one thread)
Maradatscha hat geschrieben:My Implementation of combine2 works with Task5. Could anyone give me a hint what I'm doing wrong (right) here?

I used guards in task1 and task2, all Testcases work.

edit: me = stupid copy paste mistakes, its not working anymore, found the problem
I've got the same problem, the testcase of task 4 works for me... then I copied comb235 to a new function comb235B, replaced all calls to combine or comb235 with the new function names combine2/comb235B... and comb235B still works as intended?!

What was your c&p error? Perhaps I'm able to learn from your errors :)

Benutzeravatar
sproksch
Computerversteher
Computerversteher
Beiträge: 346
Registriert: 15. Apr 2004 17:56

Re: Ex. 5, Task 4/5: comb235

Beitrag von sproksch »

Just to make sure my solution ist correct... what are your results for take 50 comb235?

I get:
[1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,27,30,32,36, 40,45,48,50,54,60,64,72,75,80,81,90,96,100,108, 120,125,128,135,144,150,160,162,180, 192,200,216,225,240,243]

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Re: Ex. 5, Task 4/5: comb235

Beitrag von sewe »

@sproksch: Yes, the result to take 50 comb235 is correct.

Antworten

Zurück zu „Archiv“