結果
問題 | No.36 素数が嫌い! |
ユーザー |
![]() |
提出日時 | 2019-05-07 01:33:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 452 bytes |
コンパイル時間 | 1,526 ms |
コンパイル使用メモリ | 165,828 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 16:52:00 |
合計ジャッジ時間 | 2,711 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 24 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); long long n, cnt = 0; cin >> n; long long h = n; for(long long i = 2; i <= sqrt(n); i++){ while(h % i == 0){ h /= i; cnt++; if(cnt >= 2){ cout << "YES" << endl; return 0; } } } cout << "NO" << endl; return 0; }