結果
| 問題 |
No.2203 POWER!!!!!
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2024-07-04 00:15:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 83 ms / 2,000 ms |
| コード長 | 253 bytes |
| コンパイル時間 | 207 ms |
| コンパイル使用メモリ | 82,284 KB |
| 実行使用メモリ | 102,048 KB |
| 最終ジャッジ日時 | 2024-07-04 00:15:46 |
| 合計ジャッジ時間 | 2,357 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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