結果

問題 No.36 素数が嫌い!
ユーザー kotatsugame
提出日時 2017-09-19 01:42:06
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 220 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 63,272 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-08 02:44:29
合計ジャッジ時間 1,869 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 15 WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
long n,i;
main()
{
	cin>>n;
	for(i=2;i*i<=n;i++)
	{
		int c=0;
		while(n%i==0)
		{
			c++;
			n/=i;
		}
		if(c>1)
		{
			cout<<"YES"<<endl;
			return 0;
		}
	}
	cout<<"NO"<<endl;
}
0