#P8811. [蓝桥杯 2022 国 C] 六六大顺
[蓝桥杯 2022 国 C] 六六大顺
Problem Description
“六六大顺” originally refers to the 6th day of the 6th month in the lunar calendar. It is often used as a blessing for middle-aged people: a happy family, smooth work, success in career, and good health. It comes from the Zuo Zhuan: “君义,臣行,父慈,子孝,兄爱,弟敬,此数者累谓六顺也。”
In China, has been a lucky number since ancient times. Define a sequence , where .
Define another sequence , where $b_1 = 6 \times 6, b_2 = 66\times66, \cdots, b_i = a_i \times a_i$.
Now Xiao Lan wants to know the sum of the first terms of sequence . Can you help Xiao Lan?
Input Format
Input one line containing a positive integer .
Output Format
Output one line containing an integer, representing the sum of the first terms of sequence .
3
447948
Hint
Sample Explanation
$b_1 = 6×6 = 36,b_2 = 66×66 = 4356,b_3 = 666×666 = 443556$, so the sum of the first three terms is .
Constraints and Notes
For of the testdata, .
For of the testdata, .
For all testdata, .
Lanqiao Cup 2022 National Contest, Group C, Problem H.
Translated by ChatGPT 5