結果

問題 No.2203 POWER!!!!!
ユーザー tassei903tassei903
提出日時 2023-02-04 10:40:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 937 ms
コンパイル使用メモリ 86,792 KB
実行使用メモリ 105,360 KB
最終ジャッジ日時 2023-09-16 07:44:50
合計ジャッジ時間 4,416 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
71,716 KB
testcase_01 AC 91 ms
71,476 KB
testcase_02 AC 89 ms
71,420 KB
testcase_03 AC 89 ms
71,480 KB
testcase_04 AC 88 ms
71,524 KB
testcase_05 AC 90 ms
71,436 KB
testcase_06 AC 89 ms
71,488 KB
testcase_07 AC 90 ms
71,624 KB
testcase_08 AC 103 ms
78,332 KB
testcase_09 AC 106 ms
84,840 KB
testcase_10 AC 114 ms
91,244 KB
testcase_11 AC 125 ms
101,932 KB
testcase_12 AC 99 ms
78,548 KB
testcase_13 AC 129 ms
105,148 KB
testcase_14 AC 134 ms
105,156 KB
testcase_15 AC 130 ms
105,156 KB
testcase_16 AC 128 ms
105,360 KB
testcase_17 AC 129 ms
105,184 KB
testcase_18 AC 89 ms
71,332 KB
testcase_19 AC 87 ms
71,276 KB
testcase_20 AC 90 ms
71,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
n = ni()
from collections import Counter

c = Counter(na())
ans = 0
for i in c:
    for j in c:
        ans += i ** j * c[i] * c[j]
print(ans)
0