Amicable pairs: Difference between revisions
Content deleted Content added
Not a robot (talk | contribs) Add BCPL |
MaiconSoft (talk | contribs) m Fix pascal version to run in delphi, changed "char" to "ansichar" to fix bug with "fillchar" and "SizeOF(tSieve)", with widechars |
||
Line 2,941: | Line 2,941: | ||
// sieve of erathosthenes without multiples of 2 |
// sieve of erathosthenes without multiples of 2 |
||
type |
type |
||
tSieve = array[0..(65536-1) div 2] of |
tSieve = array[0..(65536-1) div 2] of ansichar; |
||
var |
var |
||
ESieve : ^tSieve; |
ESieve : ^tSieve; |
||
Line 3,169: | Line 3,169: | ||
17296 [2^4*23*47*17296] |
17296 [2^4*23*47*17296] |
||
18416 [2^4*18416]</pre> |
18416 [2^4*18416]</pre> |
||
===Alternative=== |
===Alternative=== |
||
about 25-times faster. |
about 25-times faster. |