


import pytest

import datasets.config
from datasets.utils.info_utils import is_small_dataset






@pytest.mark.parametrize('dataset_size' ,   [None, 4_0_0 * 2**2_0, 6_0_0 * 2**2_0]       )
@pytest.mark.parametrize('input_in_memory_max_size' ,   ['default', 0, 1_0_0 * 2**2_0, 9_0_0 * 2**2_0]       )
def 							__lowercase       (			__lowerCAmelCase							:    Tuple ,   __lowerCAmelCase							:    Dict ,   __lowerCAmelCase							:    Optional[Any]       ):
							if input_in_memory_max_size != "default":
														monkeypatch.setattr(datasets.config ,   'IN_MEMORY_MAX_SIZE' ,   __lowerCAmelCase       )
							a__					=					datasets.config.IN_MEMORY_MAX_SIZE
							if input_in_memory_max_size == "default":
														assert in_memory_max_size == 0
							else:
														assert in_memory_max_size == input_in_memory_max_size
							if dataset_size and in_memory_max_size:
														a__					=					dataset_size < in_memory_max_size
							else:
														a__					=					False
							a__					=					is_small_dataset(__lowerCAmelCase       )
							assert result == expected








from collections import defaultdict
from math import ceil, sqrt






def 							__lowercase       (			__lowerCAmelCase							:    int = 1_0_0_0_0_0_0 ,   __lowerCAmelCase							:    int = 1_0       ):
							a__					=					defaultdict(__lowerCAmelCase       )

							for outer_width in range(3 ,   (t_limit // 4) + 2       ):
														if outer_width * outer_width > t_limit:
																					a__					=					max(
																					    ceil(sqrt(outer_width * outer_width - t_limit       )       ) ,   1       )
														else:
																					a__					=					1

														hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

														for hole_width in range(__lowerCAmelCase ,   outer_width - 1 ,   2       ):
																					count[outer_width * outer_width - hole_width * hole_width] += 1

							return sum(1 for n in count.values() if 1 <= n <= 1_0       )


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




