P10898 [Lanqiao Cup 2024 NOI Qualifier C] Assembling a Square

Description

Xiao Lan is playing a puzzle game. He has $7385137888721$ pieces of $2 \times 2$ squares and $10470245$ pieces of $1 \times 1$ squares. He needs to choose some of them to assemble a larger square. For example, using $3$ pieces of $2 \times 2$ squares and $4$ pieces of $1 \times 1$ squares, you can assemble a $4 \times 4$ square. Using $9$ pieces of $2 \times 2$ squares, you can assemble a $6 \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.

Explanation/Hint

Translated by ChatGPT 5