結果

問題 No.36 素数が嫌い!
ユーザー kotatsugame
提出日時 2016-12-18 02:23:11
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 306 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 64,156 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-14 07:44:58
合計ジャッジ時間 1,693 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
#define int long long int
bool isprime(int n)
{
	if(n==2)return true;
	else if(n%2==0)return false;
	for(int i=3;i*i<=n;i+=2)if(n%i==0)return false;
	return true;
}
signed main()
{
	int n;cin>>n;
	if(isprime(n))cout<<"NO"<<endl;
	else cout<<"YES"<<endl;
	return 0;
}
0