結果
| 問題 |
No.2203 POWER!!!!!
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2023-03-28 15:02:07 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 386 bytes |
| コンパイル時間 | 603 ms |
| コンパイル使用メモリ | 71,016 KB |
| 最終ジャッジ日時 | 2025-02-11 18:50:31 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 5 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;cin>>n;
vector<int> A(9);
for(int i = 0; n > i; i++){
int x;cin>>x;
A[x]++;
}
long long ans = 0;
for(int i = 1; 8 >= i; i++){
long long nw = i;
for(int j = 1; 8 >= j; j++){
long long count = A[i]*A[j];
ans += nw*count;
nw *= i;
}
}
cout << ans << endl;
}