結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2016-04-19 17:56:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 370 ms |
コンパイル使用メモリ | 55,136 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-04 14:07:55 |
合計ジャッジ時間 | 1,414 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 WA * 10 |
ソースコード
#include <iostream> using namespace std; int pf(unsigned long long x) { int r = 1; for ( unsigned long long i = 2; i * i <= x; ) { if ( x % i == 0 ) { r++; x = x / i; } else { i++; } } return r; } int main() { int n; cin >> n; cout << (pf(n) >= 3 ? "YES" : "NO") << endl; return 0; }