結果

問題 No.2203 POWER!!!!!
ユーザー tamatotamato
提出日時 2023-02-03 21:27:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 184 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 86,284 KB
実行使用メモリ 104,876 KB
最終ジャッジ日時 2023-09-15 16:51:54
合計ジャッジ時間 4,042 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
71,504 KB
testcase_01 AC 102 ms
71,368 KB
testcase_02 AC 98 ms
71,200 KB
testcase_03 AC 98 ms
71,360 KB
testcase_04 AC 98 ms
71,488 KB
testcase_05 AC 97 ms
71,368 KB
testcase_06 AC 99 ms
71,360 KB
testcase_07 AC 102 ms
71,204 KB
testcase_08 AC 119 ms
78,720 KB
testcase_09 AC 139 ms
86,984 KB
testcase_10 AC 162 ms
94,844 KB
testcase_11 AC 184 ms
101,212 KB
testcase_12 AC 115 ms
78,712 KB
testcase_13 AC 150 ms
104,604 KB
testcase_14 AC 147 ms
104,720 KB
testcase_15 AC 146 ms
104,876 KB
testcase_16 AC 148 ms
104,728 KB
testcase_17 AC 147 ms
104,800 KB
testcase_18 AC 98 ms
71,360 KB
testcase_19 AC 99 ms
71,340 KB
testcase_20 AC 100 ms
71,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    from collections import Counter
    input = sys.stdin.readline
    
    N = int(input())
    A = list(map(int, input().split()))
    
    C = Counter(A)
    ans = 0
    for a in A:
        for b in C:
            ans += (a ** b) * C[b]
    print(ans)


if __name__ == '__main__':
    main()
0