結果

問題 No.2203 POWER!!!!!
ユーザー cologne
提出日時 2025-06-12 17:15:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 82,584 KB
実行使用メモリ 105,088 KB
最終ジャッジ日時 2025-06-12 17:15:40
合計ジャッジ時間 3,222 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    n = int(input())
    *a, = map(int, input().split())
    a = [a.count(i) for i in range(9)]
    ans = 0
    for i in range(1, 9):
        for j in range(1, 9):
            ans += a[i]*a[j]*(i**j)
    print(ans)


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