


"""simple docstring"""


from manim import *
class   _UpperCamelCase  (   lowerCAmelCase__		):
							'''simple docstring'''







							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			Rectangle(height=0.5    ,   width=0.5	)
										__lowerCAmelCase				    =			Rectangle(height=0.4_6    ,   width=0.4_6	).set_stroke(width=0	)

										__lowerCAmelCase				    =			[mem.copy() for i in range(6	)]
										__lowerCAmelCase				    =			[mem.copy() for i in range(6	)]
										__lowerCAmelCase				    =			VGroup(*__a	).arrange(__a    ,   buff=0	)
										__lowerCAmelCase				    =			VGroup(*__a	).arrange(__a    ,   buff=0	)
										__lowerCAmelCase				    =			VGroup(__a    ,   __a	).arrange(__a    ,   buff=0	)
										__lowerCAmelCase				    =			Text("CPU"    ,   font_size=24	)
										__lowerCAmelCase				    =			Group(__a    ,   __a	).arrange(__a    ,   buff=0.5    ,   aligned_edge=__a	)
										cpu.move_to([-2.5, -0.5, 0]	)
										self.add(__a	)

										__lowerCAmelCase				    =			[mem.copy() for i in range(4	)]
										__lowerCAmelCase				    =			VGroup(*__a	).arrange(__a    ,   buff=0	)
										__lowerCAmelCase				    =			Text("GPU"    ,   font_size=24	)
										__lowerCAmelCase				    =			Group(__a    ,   __a	).arrange(__a    ,   buff=0.5    ,   aligned_edge=__a	)
										gpu.move_to([-1, -1, 0]	)
										self.add(__a	)

										__lowerCAmelCase				    =			[mem.copy() for i in range(6	)]
										__lowerCAmelCase				    =			VGroup(*__a	).arrange(__a    ,   buff=0	)

										__lowerCAmelCase				    =			Text("Model"    ,   font_size=24	)
										__lowerCAmelCase				    =			Group(__a    ,   __a	).arrange(__a    ,   buff=0.5    ,   aligned_edge=__a	)
										model.move_to([3, -1.0, 0]	)
										self.add(__a	)

										__lowerCAmelCase				    =			[]
										for i, rect in enumerate(__a	):
													rect.set_stroke(__a	)
													# target = fill.copy().set_fill(YELLOW, opacity=0.7)
													# target.move_to(rect)
													# self.add(target)

													__lowerCAmelCase				    =			Rectangle(height=0.4_6 / 4    ,   width=0.4_6 / 3	).set_stroke(width=0.0	).set_fill(__a    ,   opacity=0.7	)

													if i == 0:
																cpu_target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT	)    ,   buff=0.0_2    ,   direction=__a	)
																cpu_target.set_x(cpu_target.get_x() + 0.1	)
													elif i == 3:
																cpu_target.next_to(cpu_targs[0]    ,   direction=__a    ,   buff=0.0	)
													else:
																cpu_target.next_to(cpu_targs[i - 1]    ,   direction=__a    ,   buff=0.0	)
													self.add(__a	)
													cpu_targs.append(__a	)

										__lowerCAmelCase				    =			[mem.copy() for i in range(6	)]
										__lowerCAmelCase				    =			VGroup(*__a	).arrange(__a    ,   buff=0	)

										__lowerCAmelCase				    =			Text("Loaded Checkpoint"    ,   font_size=24	)
										__lowerCAmelCase				    =			Group(__a    ,   __a	).arrange(__a    ,   aligned_edge=__a    ,   buff=0.4	)
										checkpoint.move_to([3, 0.5, 0]	)

										__lowerCAmelCase				    =			Square(side_length=2.2	)
										key.move_to([-5, 2, 0]	)

										__lowerCAmelCase				    =			MarkupText(
										    f"<b>Key:</b>\n\n<span fgcolor='{YELLOW}'>●</span> Empty Model"    ,   font_size=18    ,   )

										key_text.move_to([-5, 2.4, 0]	)

										self.add(__a    ,   __a	)

										__lowerCAmelCase				    =			MarkupText(
										    f"<span fgcolor='{BLUE}'>●</span> Checkpoint"    ,   font_size=18    ,   )

										blue_text.next_to(__a    ,   DOWN * 2.4    ,   aligned_edge=key_text.get_left()	)

										__lowerCAmelCase				    =			MarkupText(
										    f"Next, a <i><span fgcolor=\"{BLUE}\">second</span></i> model is loaded into memory,\nwith the weights of a <span fgcolor=\"{BLUE}\">single shard</span>."    ,   font_size=24    ,   )
										step_a.move_to([2, 2, 0]	)
										self.play(Write(__a	)    ,   Write(__a	)	)

										self.play(Write(__a    ,   run_time=1	)    ,   Create(__a    ,   run_time=1	)	)

										__lowerCAmelCase				    =			[]
										__lowerCAmelCase				    =			[]
										for i, rect in enumerate(__a	):
													__lowerCAmelCase				    =			fill.copy().set_fill(__a    ,   opacity=0.7	)
													target.move_to(__a	)
													first_animations.append(GrowFromCenter(__a    ,   run_time=1	)	)

													__lowerCAmelCase				    =			target.copy()
													cpu_target.generate_target()
													if i < 5:
																cpu_target.target.move_to(cpu_left_col_base[i + 1]	)
													else:
																cpu_target.target.move_to(cpu_right_col_base[i - 5]	)
													second_animations.append(MoveToTarget(__a    ,   run_time=1.5	)	)

										self.play(*__a	)
										self.play(*__a	)
										self.wait()






"""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() = }")



