#P10576. [蓝桥杯 2024 国 A] 儿童节快乐

[蓝桥杯 2024 国 A] 儿童节快乐

Problem Description

Colorful balloons float slowly under the blue sky, cheerful music keeps echoing in our ears, and children hold hands and laugh happily together. In such a peaceful and joyful atmosphere, June 1st has arrived.

Today is Children’s Day. To let everyone enjoy the fun of solving problems during the festival, Teacher Xiao Lan has prepared an interesting problem.

The task is: find the sum of all integers nn that satisfy the following conditions:

  1. (n+10120300500)(n+10120300500) is a perfect square.
  2. (n10120300500)(n-10120300500) is also a perfect square.

If a number can be written as the square of another integer, then this number is called a perfect square. For example, 44 can be written as the square of 22, and 99 can be written as the square of 33, so 44 and 99 are both perfect squares.

Please think carefully and find the answer. Also, happy Children’s Day to everyone, and may your problem-solving go smoothly!

Input Format

This is an output-only fill-in-the-blank problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting, only enter 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 result and submit it. The result of this problem is an integer. When submitting, only enter this integer; any extra content will result in no score.

Hint

Translated by ChatGPT 5