
"""simple docstring"""



def 					_UpperCAmelCase      ( __lowerCamelCase   :       str ,					__lowerCamelCase   :       str		)     ->					list:
  _snake_case					     =       len(__lowerCamelCase		)
  _snake_case					     =       []
  for i in range(len(__lowerCamelCase		) - pat_len + 1		):
    _snake_case					     =       True
    for j in range(__lowerCamelCase		):
      if s[i + j] != pattern[j]:
        _snake_case					     =       False
        break
    if match_found:
      position.append(__lowerCamelCase		)
  return position


if __name__ == "__main__":
 assert naive_pattern_search('ABCDEFG', 'DE') == [3]
 print(naive_pattern_search('ABAAABCDBBABCDDEBCABC', 'ABC'))





"""simple docstring"""



from math import sqrt
def 					_UpperCAmelCase      ( __lowerCamelCase   :       int = 1_00_00_00		)     ->					int:
  _snake_case					     =       0
  _snake_case					     =       0
  _snake_case					     =       42

  while num_cuboids <= limit:
    max_cuboid_size += 1
    for sum_shortest_sides in range(2 ,					2 * max_cuboid_size + 1		):
      if sqrt(sum_shortest_sides**2 + max_cuboid_size**2		).is_integer():
        num_cuboids += (
            min(__lowerCamelCase ,					sum_shortest_sides // 2		)
            - max(1 ,					sum_shortest_sides - max_cuboid_size		)
            + 1
        )

  return max_cuboid_size


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



