結果
問題 |
No.8023 素数判定するだけ
|
ユーザー |
![]() |
提出日時 | 2017-03-31 23:00:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 458 bytes |
コンパイル時間 | 1,329 ms |
コンパイル使用メモリ | 168,248 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-07 05:13:07 |
合計ジャッジ時間 | 4,366 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; string zero=""; string one="#"; string two="##"; #define sz(x) ((int)x.size()) string solve(int x) { if(x==sz(one)) return "NO"; if(x==sz(two)) return "YES"; string i="##"; while(sz(i)<x) { if(x%sz(i)==sz(zero)) { return "NO"; } i.push_back('#'); } return "YES"; } int main() { int n; cin>>n; cout<<solve(n)<<endl; return zero.size(); }