結果

問題 No.36 素数が嫌い!
ユーザー snrnsidy
提出日時 2021-09-08 00:40:43
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 2,023 ms
コンパイル使用メモリ 192,476 KB
最終ジャッジ日時 2025-01-24 08:45:54
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(void)
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	long long int N;

	cin >> N;

	if(N==1)
	{
		cout << "NO" << '\n';
	}
	else
	{
		for(int i=2;i<=sqrt(N);i++)
		{
			if(N%i==0)
			{
				cout << "YES" << '\n';
				return 0;
			}
		}

		cout << "NO" << '\n';
	}

	return 0;
}
0