結果

問題 No.2203 POWER!!!!!
ユーザー Mat_hMat_h
提出日時 2023-02-03 22:02:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 12,428 KB
最終ジャッジ日時 2023-09-15 17:53:06
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,460 KB
testcase_01 AC 18 ms
8,600 KB
testcase_02 AC 18 ms
8,596 KB
testcase_03 AC 19 ms
8,460 KB
testcase_04 AC 19 ms
8,532 KB
testcase_05 AC 18 ms
8,584 KB
testcase_06 AC 18 ms
8,388 KB
testcase_07 AC 18 ms
8,416 KB
testcase_08 AC 25 ms
8,944 KB
testcase_09 AC 38 ms
9,452 KB
testcase_10 AC 48 ms
10,400 KB
testcase_11 AC 63 ms
11,340 KB
testcase_12 AC 24 ms
9,044 KB
testcase_13 AC 72 ms
12,312 KB
testcase_14 AC 72 ms
12,428 KB
testcase_15 AC 73 ms
12,284 KB
testcase_16 AC 73 ms
12,364 KB
testcase_17 AC 72 ms
12,368 KB
testcase_18 AC 18 ms
8,456 KB
testcase_19 AC 18 ms
8,596 KB
testcase_20 AC 18 ms
8,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    from collections import defaultdict
    n=int(input())
    a=list(map(int,input().split()))
    d=defaultdict(int)
    for i in range(n):
        d[a[i]]+=1
    ans=0
    for i in range(1,9):
        for j in range(1,9):
            ans+=pow(i,j)*d[i]*d[j]
    print(ans)
main()

0