





from math import isqrt, loga






def lowerCamelCase__    (							snake_case_	:  Union[str, Any]       )      ->				Union[str, Any]:
   __snake_case							       =   [True] * max_number
   for i in range(2       ,      isqrt(max_number - 1       ) + 1       ):
      if is_prime[i]:
         for j in range(i**2       ,      UpperCamelCase_       ,      UpperCamelCase_       ):
            __snake_case							       =   False

   return [i for i in range(2       ,      UpperCamelCase_       ) if is_prime[i]]






def lowerCamelCase__    (							snake_case_	:  int = 80_0800       ,      snake_case_	:  Tuple = 80_0800       )      ->				int:
   __snake_case							       =   degree * loga(UpperCamelCase_       )
   __snake_case							       =   int(UpperCamelCase_       )
   __snake_case							       =   calculate_prime_numbers(UpperCamelCase_       )

   __snake_case							       =   0
   __snake_case							       =   0
   __snake_case							       =   len(UpperCamelCase_       ) - 1
   while left < right:
      while (
          prime_numbers[right] * loga(prime_numbers[left]       )
          + prime_numbers[left] * loga(prime_numbers[right]       )
          > upper_bound
      ):
         right -= 1
      hybrid_integers_count += right - left
      left += 1

   return hybrid_integers_count


if __name__ == "__main__":
    print(F'{solution() = }')



"""simple docstring"""





import pytest

from datasets.utils.sharding import _distribute_shards, _number_of_shards_in_gen_kwargs, _split_gen_kwargs



@pytest.mark.parametrize(
    """kwargs, expected"""  ,				[
        ({"""num_shards""": 0, """max_num_jobs""": 1}, []),
        ({"""num_shards""": 10, """max_num_jobs""": 1}, [range(10				)]),
        ({"""num_shards""": 10, """max_num_jobs""": 10}, [range(UpperCamelCase_  ,				i + 1				) for i in range(10				)]),
        ({"""num_shards""": 1, """max_num_jobs""": 10}, [range(1				)]),
        ({"""num_shards""": 10, """max_num_jobs""": 3}, [range(0  ,				4				), range(4  ,				7				), range(7  ,				10				)]),
        ({"""num_shards""": 3, """max_num_jobs""": 10}, [range(0  ,				1				), range(1  ,				2				), range(2  ,				3				)]),
    ]  ,				)
def 						_lowerCAmelCase				(				UpperCamelCase_  ,				UpperCamelCase_				):
		__SCREAMING_SNAKE_CASE            = _distribute_shards(**UpperCamelCase_				)
		assert out == expected



@pytest.mark.parametrize(
    """gen_kwargs, max_num_jobs, expected"""  ,				[
        ({"""foo""": 0}, 10, [{"""foo""": 0}]),
        ({"""shards""": [0, 1, 2, 3]}, 1, [{"""shards""": [0, 1, 2, 3]}]),
        ({"""shards""": [0, 1, 2, 3]}, 4, [{"""shards""": [0]}, {"""shards""": [1]}, {"""shards""": [2]}, {"""shards""": [3]}]),
        ({"""shards""": [0, 1]}, 4, [{"""shards""": [0]}, {"""shards""": [1]}]),
        ({"""shards""": [0, 1, 2, 3]}, 2, [{"""shards""": [0, 1]}, {"""shards""": [2, 3]}]),
    ]  ,				)
def 						_lowerCAmelCase				(				UpperCamelCase_  ,				UpperCamelCase_  ,				UpperCamelCase_				):
		__SCREAMING_SNAKE_CASE            = _split_gen_kwargs(UpperCamelCase_  ,				UpperCamelCase_				)
		assert out == expected



@pytest.mark.parametrize(
    """gen_kwargs, expected"""  ,				[
        ({"""foo""": 0}, 1),
        ({"""shards""": [0]}, 1),
        ({"""shards""": [0, 1, 2, 3]}, 4),
        ({"""shards""": [0, 1, 2, 3], """foo""": 0}, 4),
        ({"""shards""": [0, 1, 2, 3], """other""": (0, 1)}, 4),
        ({"""shards""": [0, 1, 2, 3], """shards2""": [0, 1]}, RuntimeError),
    ]  ,				)
def 						_lowerCAmelCase				(				UpperCamelCase_  ,				UpperCamelCase_				):
		if expected is RuntimeError:
				with pytest.raises(UpperCamelCase_				):
						_number_of_shards_in_gen_kwargs(UpperCamelCase_				)
		else:
				__SCREAMING_SNAKE_CASE            = _number_of_shards_in_gen_kwargs(UpperCamelCase_				)
				assert out == expected




