No.2203 POWER!!!!!
問題文最終更新日: 2023-01-30 15:23:19
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 375
(順位表)
の他の問題:
Problem Statement
Find $\displaystyle\sum_{i=1}^N\sum_{j=1}^N A_i^{A_j}$.
Constraints
- $1\le N\le 2\times 10^5$
- $1\le A_i\le 8$
- All input values are integers.
Input
$N$ $A_1$ $A_2$ $\cdots$ $A_N$
Output
Output the answer.
Sample
Sample 1
Input
3 1 2 3
Output
56
$1^1+1^2+1^3+2^1+2^2+2^3+3^1+3^2+3^3=56$
Sample 2
Input
1 3
Output
27
Sample 3
Input
4 8 8 4 8
Output
151204096
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。