結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2017-03-02 04:07:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 392 ms |
コンパイル使用メモリ | 56,284 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-12 23:25:25 |
合計ジャッジ時間 | 1,812 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 17 WA * 9 |
ソースコード
#include<iostream> #include<algorithm> #include<string> using namespace std; typedef long long int LL; int main(){ LL n; bool flag=false; cin>>n; for(LL i=2;i*i<=n;i++){ if(n%i==0)flag=true,i=n; } puts(flag?"YES":"NO"); return 0; }