結果

問題 No.2203 POWER!!!!!
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-02-04 14:11:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 105,644 KB
最終ジャッジ日時 2023-09-16 10:58:57
合計ジャッジ時間 3,600 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
72,940 KB
testcase_01 AC 101 ms
72,756 KB
testcase_02 AC 100 ms
72,808 KB
testcase_03 AC 102 ms
72,932 KB
testcase_04 AC 102 ms
73,184 KB
testcase_05 AC 102 ms
72,756 KB
testcase_06 AC 102 ms
72,960 KB
testcase_07 AC 102 ms
73,116 KB
testcase_08 AC 108 ms
79,324 KB
testcase_09 AC 112 ms
85,940 KB
testcase_10 AC 122 ms
92,188 KB
testcase_11 AC 133 ms
102,000 KB
testcase_12 AC 108 ms
79,260 KB
testcase_13 AC 141 ms
105,528 KB
testcase_14 AC 135 ms
105,644 KB
testcase_15 AC 137 ms
105,544 KB
testcase_16 AC 136 ms
105,456 KB
testcase_17 AC 139 ms
105,316 KB
testcase_18 AC 102 ms
73,140 KB
testcase_19 AC 101 ms
72,952 KB
testcase_20 AC 101 ms
73,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

N = int(input())
A = list(map(int,input().split()))
C = Counter(A)
ans = 0
for k,v in C.items():
    for k2,v2 in C.items():
        ans += v*v2*pow(k,k2)
print(ans)
0