Whats the most optimal way to detect prime numbers from 2 to n?

Правка en1, от AlirezaBest, 2026-02-26 23:08:22

Hello..I was solving problems of cf round 1083 Div.2 and when i encountered problem B i was fighting with time limit error i used the famous O(sqrt(n)) algorithm to detect prime numbers..but is there an algorithm from better order or not?

Thank you for reading:)

Теги number theory

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский AlirezaBest 2026-02-26 23:08:22 328 Initial revision (published)