結果

問題 No.2203 POWER!!!!!
ユーザー 👑 rin204rin204
提出日時 2023-02-03 21:27:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 1,769 ms
コンパイル使用メモリ 86,712 KB
実行使用メモリ 104,068 KB
最終ジャッジ日時 2023-09-15 16:51:38
合計ジャッジ時間 4,235 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
70,792 KB
testcase_01 AC 77 ms
71,096 KB
testcase_02 AC 78 ms
71,156 KB
testcase_03 AC 77 ms
71,176 KB
testcase_04 AC 76 ms
70,996 KB
testcase_05 AC 77 ms
71,072 KB
testcase_06 AC 77 ms
71,172 KB
testcase_07 AC 77 ms
70,920 KB
testcase_08 AC 85 ms
77,308 KB
testcase_09 AC 88 ms
83,612 KB
testcase_10 AC 99 ms
90,420 KB
testcase_11 AC 110 ms
100,716 KB
testcase_12 AC 88 ms
77,152 KB
testcase_13 AC 114 ms
104,068 KB
testcase_14 AC 108 ms
103,840 KB
testcase_15 AC 108 ms
103,976 KB
testcase_16 AC 108 ms
103,744 KB
testcase_17 AC 108 ms
103,740 KB
testcase_18 AC 76 ms
70,988 KB
testcase_19 AC 76 ms
71,056 KB
testcase_20 AC 75 ms
71,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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