Search found 3 matches

by ichaoz
Sun Feb 23, 2003 1:20 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320305

no problem :)
i don't think you need to cache anything. If you try just
the input 1 100000 then caching doesn't pay.
Another problem that may cause a WA is that you don't
initialize your array before using it. So discard your array,
send your code, and you'll be fine :wink:
by ichaoz
Tue Feb 18, 2003 11:46 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320305

Hi again,
i meant that you have to remove all your array statements.
(including the if-statment)
you really don't need it.
by ichaoz
Mon Feb 17, 2003 9:23 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320305

hi,
i've just looked at your code and noticed that you don't need
your array. the else statement
[cpp]count=array ;[/cpp]
will never be executed because you don't write into the array before you check it with the if-statement
[cpp]if(array == 0) [/cpp]
your count variable is sufficent

hope that ...

Go to advanced search