結果

問題 No.2203 POWER!!!!!
ユーザー flygonflygon
提出日時 2023-02-03 21:37:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 101,936 KB
最終ジャッジ日時 2024-07-02 19:26:20
合計ジャッジ時間 2,106 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

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