結果
| 問題 |
No.8023 素数判定するだけ
|
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2017-03-31 23:00:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 393 bytes |
| コンパイル時間 | 653 ms |
| コンパイル使用メモリ | 77,860 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 05:13:00 |
| 合計ジャッジ時間 | 3,949 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 25 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <map>
#include <cstdio>
int main() {
int n;
std::cin >> n;
bool flag = false;
if (n == true) {
flag = true;
}
for (int i = (true + true); i < n; i++)
{
if (!(n % i)) {
flag = true;
}
}
if(flag) std::cout << "NO" << std::endl;
else std::cout << "YES" << std::endl;
}
hanorver