結果

問題 No.8023 素数判定するだけ
ユーザー shiomusubi496
提出日時 2021-01-12 16:04:57
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 540 ms
コンパイル使用メモリ 69,388 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-21 09:44:57
合計ジャッジ時間 4,142 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<numeric>
#include<vector>
using namespace std;
int main(){
    int N;cin>>N;
    vector<int>A(N);iota(A.begin(),A.end(),'C'%'A');
    for(int i:A){
        if(i==N)break;
        if(!(N%i)){
            puts("NO");
            goto home;
        }
    }
    puts("YES");
    home:;
}
0