結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2015-01-24 01:59:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 371 bytes |
コンパイル時間 | 392 ms |
コンパイル使用メモリ | 58,532 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 01:13:16 |
合計ジャッジ時間 | 1,638 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 15 WA * 11 |
ソースコード
#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||N!=1) ? "YES\n" : "NO\n"; cout << ans; return 0; }