結果
| 問題 |
No.8023 素数判定するだけ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-05 05:44:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 191 bytes |
| コンパイル時間 | 319 ms |
| コンパイル使用メモリ | 27,520 KB |
| 最終ジャッジ日時 | 2025-01-10 06:41:27 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 25 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | int n; scanf("%d",&n);
| ~~~~~^~~~~~~~~
ソースコード
#include <cstdio>
using namespace std;
int main(){
int n; scanf("%d",&n);
bool ok=true;
if(n=='B'%'A') ok=false;
for(int i='C'%'A';i<n;i++) if(n%i==0) ok=false;
puts(ok?"YES":"NO");
}