結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2016-03-18 22:30:10 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 634 bytes |
コンパイル時間 | 693 ms |
コンパイル使用メモリ | 66,016 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 09:08:26 |
合計ジャッジ時間 | 2,016 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 26 |
ソースコード
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <stack> #include <set> #include <list> #define INF 99999999; using namespace std; int factorCount(long long N){ int count = 0; for (long long i = 2; i*i < N; i++) { while (N%i == 0) { N /= i; count++; } } if(N != 1)count++; return count; } int main(int argc, const char * argv[]) { long long N; cin >> N; //素数,1,それ自身以外で割り切れるかどうか判定 // if(factorCount(N)<3)cout << "No" << endl; else cout << "Yes" << endl; }