結果

問題 No.36 素数が嫌い!
ユーザー ku_material_roku_material_ro
提出日時 2016-09-27 09:50:58
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 517 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 58,884 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-01 05:39:27
合計ジャッジ時間 3,171 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 92 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 WA -
testcase_11 AC 40 ms
5,376 KB
testcase_12 AC 118 ms
5,376 KB
testcase_13 AC 118 ms
5,376 KB
testcase_14 AC 74 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 63 ms
5,376 KB
testcase_25 WA -
testcase_26 AC 72 ms
5,376 KB
testcase_27 AC 101 ms
5,376 KB
testcase_28 AC 70 ms
5,376 KB
testcase_29 AC 113 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<math.h>
using namespace std;

/*int sosu(long long N){
	long long A;
	int J = 0;
	for (long long i1 = 2; i1 < N/2; i1++){
		A = (N / i1)*i1;
		if (A == N){
			J = 1;
			break;
		}
	}
	return J;

}*/

int main(){
	long long n;
	long long a;
	int cnt = 0;
	cin >> n;
	a = n;
	//int judge = 0;
	for (long long i = 2; i < sqrt(n); i++){
		while (a%i == 0){
			a /= i;
			cnt++;
		}
	}
	if (cnt >=3){
		cout << "YES" << endl;
	}
	else{
		cout << "NO" << endl;
	}

	return 0;
}
0