結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2015-01-24 01:58:15 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 365 bytes |
コンパイル時間 | 584 ms |
コンパイル使用メモリ | 57,656 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-23 01:13:14 |
合計ジャッジ時間 | 1,634 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 16 WA * 10 |
ソースコード
#include <iostream> #include <algorithm> #include <string> #define REP(a,b,c) for(int a=b; a<(int)c; a++) using namespace std; int main(){ long long int N; cin >> N; bool flag = true; int cnt = 0; for(long long int i=2; i*i<=N; i++){ while(N%i == 0){ cnt++; N /= i; } } string ans = (cnt>=3) ? "YES\n" : "NO\n"; cout << ans; return 0; }