ScratchData LogoScratchData
Back to sakura_neko's profile

Atkinの篩

SAsakura_neko•Created May 1, 2024
Atkinの篩
9
7
165 views
View on Scratch

Instructions

N以下の素数を昇順に列挙します 区間ごとに篩を実行し、出力を1行に複数詰め込んだので、理論上はScratchでも4000億(4.389×10^11)くらいまでいけます(おそらく先にメモリが足りなくなる) https://turbowarp.org/1011608511 だと10億まで列挙するのに2分ほどかかりました

Description

参考 https://uwitenpen.hatenadiary.org/entry/20111203 http://stackoverflow.com/questions/19388106/the-sieve-of-atkin/22161595#22161595 Atkinの篩は巷で言われるほど速くないらしい Eratosthenesの篩の最適化を頑張った方が良かったかも →できました https://scratch.mit.edu/projects/1070936691

Project Details

Project ID1011608511
CreatedMay 1, 2024
Last ModifiedSeptember 21, 2024
SharedMay 3, 2024
Visibilityvisible
CommentsAllowed