結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-01 10:53:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 371 bytes |
| コンパイル時間 | 591 ms |
| コンパイル使用メモリ | 70,236 KB |
| 実行使用メモリ | 10,020 KB |
| 最終ジャッジ日時 | 2024-11-20 10:38:01 |
| 合計ジャッジ時間 | 44,932 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 TLE * 7 |
ソースコード
#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 <= 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;
}
}