結果
| 問題 | 
                            No.2203 POWER!!!!!
                             | 
                    
| コンテスト | |
| ユーザー | 
                            👑  Kazun
                         | 
                    
| 提出日時 | 2023-02-03 21:32:55 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 81 ms / 2,000 ms | 
| コード長 | 318 bytes | 
| コンパイル時間 | 171 ms | 
| コンパイル使用メモリ | 82,176 KB | 
| 実行使用メモリ | 95,872 KB | 
| 最終ジャッジ日時 | 2024-07-02 19:18:23 | 
| 合計ジャッジ時間 | 2,064 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
ソースコード
def solve():
    N=int(input())
    A=list(map(int,input().split()))
    K=max(A)
    count=[A.count(i) for i in range(K+1)]
    ans=0
    for a in range(K+1):
        for b in range(K+1):
            ans+=count[a]*count[b]*pow(a,b)
    return ans
#==================================================
print(solve())
            
            
            
        
            
Kazun