結果
| 問題 | No.2203 POWER!!!!! |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2024-07-04 00:15:43 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 101 ms / 2,000 ms |
| + 238µs | |
| コード長 | 253 bytes |
| 記録 | |
| コンパイル時間 | 227 ms |
| コンパイル使用メモリ | 95,980 KB |
| 実行使用メモリ | 105,692 KB |
| 最終ジャッジ日時 | 2026-08-05 16:45:47 |
| 合計ジャッジ時間 | 3,644 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
freq = Counter(A)
ans = 0
for a in range(1, 9):
for b in range(1, 9):
cnt = freq[a] * freq[b] # a^b の個数
ans += pow(a, b) * cnt
print(ans)
norioc