結果

問題 No.2203 POWER!!!!!
ユーザー おきょん.おきょん.
提出日時 2023-02-04 22:54:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 105,904 KB
最終ジャッジ日時 2023-09-16 19:25:34
合計ジャッジ時間 3,839 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
71,696 KB
testcase_01 AC 88 ms
71,768 KB
testcase_02 AC 86 ms
71,508 KB
testcase_03 AC 87 ms
71,384 KB
testcase_04 AC 85 ms
71,460 KB
testcase_05 AC 84 ms
71,904 KB
testcase_06 AC 87 ms
71,580 KB
testcase_07 AC 86 ms
71,720 KB
testcase_08 AC 104 ms
78,896 KB
testcase_09 AC 101 ms
85,636 KB
testcase_10 AC 107 ms
91,444 KB
testcase_11 AC 119 ms
101,876 KB
testcase_12 AC 102 ms
79,000 KB
testcase_13 AC 125 ms
105,660 KB
testcase_14 AC 127 ms
105,752 KB
testcase_15 AC 127 ms
105,688 KB
testcase_16 AC 127 ms
105,904 KB
testcase_17 AC 124 ms
105,724 KB
testcase_18 AC 86 ms
71,816 KB
testcase_19 AC 83 ms
71,476 KB
testcase_20 AC 87 ms
71,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
n = int(input())
l = list(map(int,input().split()))

a = defaultdict(int)
for element in l: 
    a[element] = a.get(element, 0) + 1 

z = 0 
for i in range(1, 9): 
    for j in range(1, 9): 
        z += a[i] * a[j] * (i ** j) 
print(z) 
0