結果
| 問題 | No.8023 素数判定するだけ |
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2017-03-31 22:58:59 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 354 bytes |
| 記録 | |
| コンパイル時間 | 733 ms |
| コンパイル使用メモリ | 94,532 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-28 19:49:21 |
| 合計ジャッジ時間 | 4,812 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
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