結果

問題 No.2203 POWER!!!!!
ユーザー flygonflygon
提出日時 2023-02-03 21:37:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 1,148 ms
コンパイル使用メモリ 86,720 KB
実行使用メモリ 105,012 KB
最終ジャッジ日時 2023-09-15 17:15:33
合計ジャッジ時間 4,696 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
71,352 KB
testcase_01 AC 101 ms
71,528 KB
testcase_02 AC 102 ms
71,512 KB
testcase_03 AC 108 ms
71,212 KB
testcase_04 AC 102 ms
71,768 KB
testcase_05 AC 102 ms
71,432 KB
testcase_06 AC 100 ms
71,348 KB
testcase_07 AC 99 ms
71,356 KB
testcase_08 AC 107 ms
78,620 KB
testcase_09 AC 113 ms
85,076 KB
testcase_10 AC 122 ms
91,628 KB
testcase_11 AC 132 ms
101,516 KB
testcase_12 AC 108 ms
78,504 KB
testcase_13 AC 143 ms
105,012 KB
testcase_14 AC 138 ms
104,932 KB
testcase_15 AC 136 ms
104,680 KB
testcase_16 AC 137 ms
104,848 KB
testcase_17 AC 139 ms
104,652 KB
testcase_18 AC 95 ms
71,536 KB
testcase_19 AC 97 ms
71,356 KB
testcase_20 AC 98 ms
71,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(5*10**5)
input = sys.stdin.readline
from collections import defaultdict, deque, Counter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
from math import gcd

n = int(input())
a = list(map(int,input().split()))
c = Counter(a)

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

print(ans)
0