結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2018-03-20 16:13:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 1,619 ms |
コンパイル使用メモリ | 167,976 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 22:55:57 |
合計ジャッジ時間 | 2,793 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 WA * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { long long i; long long N; cin >> N; if( N % 2 == 0 ) { cout << "YES" << endl; return 0; } for( i = 3; i * i <= N; i += 2 ) { if( N % i == 0 ) { cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }