結果

問題 No.2203 POWER!!!!!
ユーザー rlangevinrlangevin
提出日時 2023-02-03 21:36:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 203 bytes
コンパイル時間 583 ms
コンパイル使用メモリ 87,340 KB
実行使用メモリ 104,172 KB
最終ジャッジ日時 2023-09-15 17:13:50
合計ジャッジ時間 3,089 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
71,372 KB
testcase_01 AC 75 ms
71,336 KB
testcase_02 AC 75 ms
71,344 KB
testcase_03 AC 74 ms
71,184 KB
testcase_04 AC 75 ms
71,316 KB
testcase_05 AC 77 ms
71,308 KB
testcase_06 AC 73 ms
71,432 KB
testcase_07 AC 74 ms
71,496 KB
testcase_08 AC 80 ms
77,772 KB
testcase_09 AC 90 ms
84,076 KB
testcase_10 AC 94 ms
90,832 KB
testcase_11 AC 107 ms
100,688 KB
testcase_12 AC 81 ms
77,440 KB
testcase_13 AC 109 ms
104,168 KB
testcase_14 AC 109 ms
104,172 KB
testcase_15 AC 110 ms
104,160 KB
testcase_16 AC 109 ms
104,168 KB
testcase_17 AC 111 ms
104,116 KB
testcase_18 AC 75 ms
71,028 KB
testcase_19 AC 74 ms
71,204 KB
testcase_20 AC 76 ms
71,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
D = [0] * 9
for a in A:
    D[a] += 1

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