結果

問題 No.36 素数が嫌い!
ユーザー kotatsugame
提出日時 2017-09-19 01:46:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 105 ms / 5,000 ms
コード長 146 bytes
コンパイル時間 619 ms
コンパイル使用メモリ 63,916 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-27 01:16:04
合計ジャッジ時間 1,881 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
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,c;
main()
{
	cin>>n;
	for(i=2;i*i<=n;i++)for(;n%i<1;c+=n>1)n/=i;
	cout<<(c>1?"YES":"NO")<<endl;
}
0