Sieve of Eratosthenes in C++

Updated June 8th, 2017. This post was introduced to the Redditย /r/cpp soon after I posted and immediately got a feedback saying "both semantically wrong as well as poorly optimized" which is quite true. ๐Ÿ™‚ ย So I'd like to recommend visiting the Reddit link and consider the comments before preceding or even better, refer to the … Continue reading Sieve of Eratosthenes in C++

์œˆ๋„์šฐ ๋“œ๋ผ์ด๋ฒ„ ์ฝ”๋“œ ์‚ฌ์ด๋‹ ์‹ค์šฉ ๊ฐ€์ด๋“œ

์œˆ๋„์šฐ ์ฝ”๋“œ ์‚ฌ์ธ์€ ๋ณต์žกํ•ฉ๋‹ˆ๋‹ค. ์œˆ๋„์šฐ ์ฝ”๋“œ ์‚ฌ์ธ์ด ๋ณต์žกํ•œ ์ด์œ ๋Š” ๊ธฐ์ˆ ์˜ ๋ณต์žก๋„๊ฐ€ ๋†’์•„์„œ๋ผ๊ธฐ ๋ณด๋‹จ, ๊ทธ๊ฒƒ์ด ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜๊ณ  ์žˆ๋Š” ์œˆ๋„์šฐ ์ฝ”๋“œ ์‚ฌ์ธ์˜ ์ •์ฑ…์ด ์œˆ๋„์šฐ ๋ฒ„์ „๋งˆ๋‹ค ๋‹ค๋ฅด๊ณ  ๋ณต์žกํ•ด์„œ ์ผ ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ์ € ์—ญ์‹œ ์ปค๋„ ๋“œ๋ผ์ด๋ฒ„ ์‚ฌ์ธ ์ด์Šˆ๋กœ ๋‹ค์‹œ ์˜ˆ์ „ ์ง€์‹์„ ํ™˜๊ธฐ์‹œํ‚ค๋ ค๊ณ  ๋…ธ๋ ฅํ•˜๋‹ค๊ฐ€, ์ธํ„ฐ๋„ท์—์„œ ์ข‹์€ ๊ธ€์„ ํ•˜๋‚˜ ๋ฐœ๊ฒฌํ•˜๊ฒŒ ๋˜์—ˆ๊ณ  ์› ์ €์ž์˜ ํ—ˆ๋ฝ์„ ๋งก์•„ ๋ฒˆ์—ญ์„ ํ•˜๊ณ  ๊ทธ ๊ฒฐ๊ณผ๋ฅผ ์ด๊ณณ์— ์˜ฌ๋ฆฌ๊ฒŒ … Continue reading ์œˆ๋„์šฐ ๋“œ๋ผ์ด๋ฒ„ ์ฝ”๋“œ ์‚ฌ์ด๋‹ ์‹ค์šฉ ๊ฐ€์ด๋“œ