結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2016-10-10 18:18:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 707 bytes |
コンパイル時間 | 1,250 ms |
コンパイル使用メモリ | 157,660 KB |
実行使用メモリ | 9,892 KB |
最終ジャッジ日時 | 2024-11-22 00:58:00 |
合計ジャッジ時間 | 28,348 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 18 WA * 4 TLE * 4 |
ソースコード
#include <bits/stdc++.h> const static double de_PI = 3.14159265358979323846; const static int de_MOD = 1000000007; const static int de_MAX = 999999999; const static int de_MIN = -999999999; int main(void) { //std::ifstream in("123.txt"); std::cin.rdbuf(in.rdbuf()); unsigned long long N = 0; std::cin >> N; bool flg = false; if (N % 2 == 0) { if (N >= 8) { for (int i = 4; i < N / 4; i += 2) { if (N%i == 0) { flg = true; break; } } } } else { if (N >= 27) { for (int i = 9; i < N / 9; i += 2) { if (N%i == 0) { flg = true; break; } } } } if (flg) { std::cout << "YES" << std::endl; } else { std::cout << "NO" << std::endl; } }