{"trustable":true,"sections":[{"title":"Description","value":{"format":"MD","content":"给定 $n$ 个整数 $a_{1}, a_{2}, \\cdots, a_{n}$, 求它们两两相乘再相加的和,即\n\n$$\nS\u003da_{1} \\cdot a_{2}+a_{1} \\cdot a_{3}+\\cdots+a_{1} \\cdot a_{n}+a_{2} \\cdot a_{3}+\\cdots+a_{n-2} \\cdot a_{n-1}+a_{n-2} \\cdot a_{n}+a_{n-1} \\cdot a_{n}\n$$\n"}},{"title":"Input","value":{"format":"MD","content":"输入的第一行包含一个整数 $n$ 。\n\n第二行包含 $n$ 个整数 $a_{1}, a_{2}, \\cdots a_{n}$ 。\n"}},{"title":"Output","value":{"format":"MD","content":"输出一个整数 $S$,表示所求的和。请使用合适的数据类型进行运算。"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\n1 3 6 9\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e117\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"MD","content":"对于 $30 \\%$ 的数据, $1 \\leq n \\leq 1000,1 \\leq a_{i} \\leq 100$ 。\n\n对于所有评测用例, $1 \\leq n \\leq 2\\times10^5,1 \\leq a_{i} \\leq 1000$ 。 \n\n蓝桥杯 2022 省赛 A 组 C 题。"}}]}