結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-01 10:54:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 375 bytes |
| コンパイル時間 | 866 ms |
| コンパイル使用メモリ | 70,268 KB |
| 実行使用メモリ | 8,448 KB |
| 最終ジャッジ日時 | 2024-11-20 10:39:13 |
| 合計ジャッジ時間 | 37,902 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 TLE * 6 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
typedef long long ll;
ll f(ll x) {
if (x % 2 == 0) return x / 2;
for (int i = 3; i * i <= x; i += 2) if (x % i == 0) return x / i;
return 1;
}
int main() {
ll N;
cin >> N;
if (f(f(N)) > 1) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}