結果
| 問題 |
No.1498 Factorization from -1 to 1
|
| ユーザー |
MaHan
|
| 提出日時 | 2021-05-05 03:16:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 402 bytes |
| コンパイル時間 | 618 ms |
| コンパイル使用メモリ | 64,340 KB |
| 実行使用メモリ | 10,144 KB |
| 最終ジャッジ日時 | 2024-07-26 12:10:37 |
| 合計ジャッジ時間 | 5,546 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 -- * 3 |
| other | -- * 17 |
ソースコード
#include <iostream>
#include <cstdlib>
typedef long long LL;
int main() {
LL Q;
LL* q;
std::cin >> Q;
q = (LL*)malloc(sizeof(LL)*Q);
for (int i = 0; i < Q; i++) {
std::cin >> q[i];
q[i] = q[i]*q[i]+1;
}
for (int i = 0; i < Q; i++) {
for (int p = 2; p <= q[i]; p++) {
while (q[i]%p == 0) {
std::cout << p << ' ';
q[i]/=p;
}
}
std::cout << std::endl;
}
return 0;
}
MaHan