結果

問題 No.2203 POWER!!!!!
ユーザー Ricky_ponRicky_pon
提出日時 2023-02-03 21:45:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 11,400 KB
最終ジャッジ日時 2023-09-15 17:26:18
合計ジャッジ時間 1,688 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,840 KB
testcase_01 AC 15 ms
7,884 KB
testcase_02 AC 16 ms
7,828 KB
testcase_03 AC 16 ms
7,888 KB
testcase_04 AC 16 ms
7,984 KB
testcase_05 AC 15 ms
7,884 KB
testcase_06 AC 15 ms
7,804 KB
testcase_07 AC 16 ms
7,860 KB
testcase_08 AC 21 ms
8,652 KB
testcase_09 AC 33 ms
9,124 KB
testcase_10 AC 46 ms
10,140 KB
testcase_11 AC 61 ms
10,932 KB
testcase_12 AC 22 ms
8,560 KB
testcase_13 AC 70 ms
11,340 KB
testcase_14 AC 69 ms
11,400 KB
testcase_15 AC 69 ms
11,340 KB
testcase_16 AC 69 ms
11,372 KB
testcase_17 AC 69 ms
11,400 KB
testcase_18 AC 15 ms
7,940 KB
testcase_19 AC 15 ms
7,952 KB
testcase_20 AC 14 ms
7,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
cnt = [0] * 9
for x in a:
    cnt[x] += 1

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