結果
問題 | No.36 素数が嫌い! |
ユーザー |
|
提出日時 | 2016-11-21 00:10:02 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 52 ms / 5,000 ms |
コード長 | 511 bytes |
コンパイル時間 | 709 ms |
コンパイル使用メモリ | 80,192 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 00:51:17 |
合計ジャッジ時間 | 1,846 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
#define _USE_MATH_DEFINES #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include<iomanip> //#include<bits/stdc++.h> using namespace std; long h(long w){ if(w%2==0)return w/2; for(long i=3;i*i<=w;i+=2)if(w%i==0)return w/i; return 1; } int main() { long a; cin>>a; if(h(h(a))==1)cout<<"NO"<<endl; else cout<<"YES"<<endl; return 0; }