#P10898. [蓝桥杯 2024 省 C] 拼正方形

[蓝桥杯 2024 省 C] 拼正方形

Problem Description

Xiao Lan is playing a puzzle game. He has 73851378887217385137888721 pieces of 2×22 \times 2 squares and 1047024510470245 pieces of 1×11 \times 1 squares. He needs to choose some of them to assemble a larger square.

For example, using 33 pieces of 2×22 \times 2 squares and 44 pieces of 1×11 \times 1 squares, you can assemble a 4×44 \times 4 square. Using 99 pieces of 2×22 \times 2 squares, you can assemble a 6×66 \times 6 square.

What is the maximum side length of a square that Xiao Lan can assemble?

Input Format

This is an output-only fill-in-the-blank problem. You only need to compute the answer and submit it. The answer is an integer. When submitting, enter only this integer; any extra content will result in no score.

Output Format

This is an output-only fill-in-the-blank problem. You only need to compute the answer and submit it. The answer is an integer. When submitting, enter only this integer; any extra content will result in no score.

Hint

Translated by ChatGPT 5