結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2018-11-24 12:53:31 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 923 ms |
コンパイル使用メモリ | 130,304 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-11-30 13:13:00 |
合計ジャッジ時間 | 2,272 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 24 WA * 2 |
ソースコード
#include <iostream> #include <vector> #include <map> #include <cmath> using i64 = long long; int main() { i64 n = 0; std::cin >> n; bool flag = false; const i64 max = 100000000000000; const i64 goal = i64(std::sqrt(n) + 1); int counter = 0; for( i64 i = 2; i <= goal; ++i){ if(n%i==0) { ++counter; if(counter>=2) { flag = true; break; } } } if(flag==false) std::cout << "NO" << std::endl; else std::cout << "YES" << std::endl; return 0; }