def get_primality_testing_rounds(num: int) -> int:
  """밀러-라빈 소수 판정법을 수행할 때, 반복할 횟수를 구한다.
  
  1300 <= num:  k = 2
  850 <= num:    k = 3
  650 <= num:    k = 4
  300 <= num:    k = 10
  300 > num:    k = 30

  ref : http://cacr.uwaterloo.ca/hac/about/chap4.pdf
  """

  nbits = num.bit_length()
  if nbits >= 1300:
    return 2
  if nbits >= 850:
    return 3
  if nbits >= 650:
    return 4
  if nbits >= 300:
    return 10
  
  return 30