結果
| 問題 |
No.1233 割り切れない気持ち
|
| コンテスト | |
| ユーザー |
QCFium
|
| 提出日時 | 2019-07-31 01:58:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 366 bytes |
| コンパイル時間 | 1,539 ms |
| コンパイル使用メモリ | 173,808 KB |
| 実行使用メモリ | 11,680 KB |
| 最終ジャッジ日時 | 2024-06-22 16:32:07 |
| 合計ジャッジ時間 | 6,542 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 TLE * 1 -- * 33 |
ソースコード
/* TLE expected */
#include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
int main() {
int n = ri();
std::map<int, int> a;
for (int i = 0; i < n; i++) a[ri()]++;
int64_t res = 0;
for (auto &i : a) {
for (auto &j : a) {
res += (int64_t) i.second * j.second * (i.first % j.first);
}
}
std::cout << res << std::endl;
return 0;
}
QCFium