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