Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

Блог пользователя 3905

Автор 3905, история, 9 лет назад, По-английски

Google search just says that execution time is proportional to certainty with the relation that (1 — 1/2^certainity) is less than actual probability of returning a prime but no explicit formula is mentioned ! It would be great if someone can tell that! Thank you !

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It is based on Miller-Rabin primality test, which gives O(klg2n)