Brilliant numbers: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (Automated syntax highlighting fixup (second round - minor fixes)) |
m (Fixed Swift syntax highlighting) |
||
Line 1,281: | Line 1,281: | ||
=={{header|Swift}}== |
=={{header|Swift}}== |
||
Magnitudes of 1 to 3 is decent, 4 and beyond becomes slow. |
Magnitudes of 1 to 3 is decent, 4 and beyond becomes slow. |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="swift">// Refs: |
||
// https://www.geeksforgeeks.org/sieve-of-eratosthenes/?ref=leftbar-rightbar |
// https://www.geeksforgeeks.org/sieve-of-eratosthenes/?ref=leftbar-rightbar |
||
// https://developer.apple.com/documentation/swift/array/init(repeating:count:)-5zvh4 |
// https://developer.apple.com/documentation/swift/array/init(repeating:count:)-5zvh4 |
||
Line 1,399: | Line 1,399: | ||
First brilliant number >= 100000: 100013 at position 2505 |
First brilliant number >= 100000: 100013 at position 2505 |
||
First brilliant number >= 1000000: 1018081 at position 10538</pre> |
First brilliant number >= 1000000: 1018081 at position 10538</pre> |
||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
{{libheader|Wren-math}} |
{{libheader|Wren-math}} |