結果

問題 No.2203 POWER!!!!!
ユーザー dachengzdachengz
提出日時 2023-02-06 11:33:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 91,628 KB
最終ジャッジ日時 2023-09-17 23:14:21
合計ジャッジ時間 3,630 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
71,500 KB
testcase_01 AC 94 ms
71,624 KB
testcase_02 AC 95 ms
71,348 KB
testcase_03 AC 97 ms
71,344 KB
testcase_04 AC 95 ms
71,400 KB
testcase_05 AC 97 ms
71,352 KB
testcase_06 AC 98 ms
71,492 KB
testcase_07 AC 96 ms
71,656 KB
testcase_08 AC 104 ms
77,596 KB
testcase_09 AC 107 ms
80,796 KB
testcase_10 AC 113 ms
83,844 KB
testcase_11 AC 119 ms
89,688 KB
testcase_12 AC 104 ms
77,696 KB
testcase_13 AC 121 ms
91,496 KB
testcase_14 AC 121 ms
91,344 KB
testcase_15 AC 121 ms
91,560 KB
testcase_16 AC 122 ms
91,628 KB
testcase_17 AC 124 ms
91,316 KB
testcase_18 AC 99 ms
71,424 KB
testcase_19 AC 97 ms
71,240 KB
testcase_20 AC 96 ms
71,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

N = int(input())
freq = [0] * 9
for a in input().split():
    freq[int(a)] += 1

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