結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-20 16:48:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 460 bytes |
| コンパイル時間 | 1,861 ms |
| コンパイル使用メモリ | 166,192 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-24 00:46:36 |
| 合計ジャッジ時間 | 2,697 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long i;
long long N;
bool b;
cin >> N;
if( N > 4 && N % 4 == 0 )
{
cout << "YES" << endl;
return 0;
}
if( N > 2 && N % 2 == 0 )
{
b = true;
N /= 2;
}
i = 3;
while( i * i <= N )
{
if( N % i == 0 )
{
if( b )
{
cout << "YES" << endl;
return 0;
}
else
{
b = true;
N /= i;
}
}
else
i += 2;
}
cout << "NO" << endl;
return 0;
}