結果
| 問題 | No.2203 POWER!!!!! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-03 21:37:29 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 103 ms / 2,000 ms |
| + 234µs | |
| コード長 | 389 bytes |
| 記録 | |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 96,492 KB |
| 実行使用メモリ | 108,800 KB |
| 最終ジャッジ日時 | 2026-08-04 05:28:00 |
| 合計ジャッジ時間 | 3,574 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
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)