結果
問題 | No.36 素数が嫌い! |
ユーザー |
|
提出日時 | 2023-01-11 22:56:52 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 262 bytes |
コンパイル時間 | 2,023 ms |
コンパイル使用メモリ | 192,276 KB |
最終ジャッジ日時 | 2025-02-10 01:46:22 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 17 WA * 9 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;#define rep(i,l,r) for(ll i=(l);i<(r);++i)int main(){ll n; cin>>n;bool flg=false;for(ll i=2; i*i<=n; i++){if(n%i==0) flg=true;}if(n==1) flg=false;cout<<(flg?"YES":"NO")<<endl;}