結果
| 問題 |
No.8023 素数判定するだけ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-19 16:19:53 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 274 bytes |
| コンパイル時間 | 1,136 ms |
| コンパイル使用メモリ | 106,108 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-07 23:30:23 |
| 合計ジャッジ時間 | 4,424 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include<iostream>
#include<string>
#include<functional>
using namespace std;
int main(){
int n;
cin>>n;
bool p=n!=string("#").size();
for(int i=string("##").size();i<n;i=plus()(i,string("#").size()))
if(n%i==string().size())
p=false;
cout<<(p?"YES":"NO")<<endl;
}