結果
問題 |
No.8023 素数判定するだけ
|
ユーザー |
![]() |
提出日時 | 2017-04-01 00:57:57 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 245 bytes |
コンパイル時間 | 463 ms |
コンパイル使用メモリ | 55,760 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-07 14:43:59 |
合計ジャッジ時間 | 3,885 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 25 |
ソースコード
#include<iostream> using namespace std; int main(){ int n; std::cin >> n; for (int i = 2; i*i <= n; i++) { if(n%i == 0){ std::cout << "NO" << std::endl; return 0; } } std::cout << "YES" << std::endl; return 0; }