結果

問題 No.2379 Burnside's Theorem
ユーザー sidhant 99sidhant 99
提出日時 2023-07-14 22:42:41
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 704 bytes
コンパイル時間 872 ms
コンパイル使用メモリ 84,744 KB
実行使用メモリ 814,316 KB
最終ジャッジ日時 2023-10-14 12:59:27
合計ジャッジ時間 3,768 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 3 ms
4,348 KB
testcase_03 RE -
testcase_04 MLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<climits>
#include<math.h>
#include<vector>
#include<cstring>
#include<string>
using namespace std;
#define int long long

int32_t main() {
	int n; cin >> n;
	int arrsize = n / 2;
	int a[arrsize] = {0};
	int count = 0;
	for (int i = 2; i < n; i++) {
		int flag = 0;
		for (int j = 2; j < i; j++) {
			if (i % j == 0) {
				flag = 1;
				break;
			}
		}
		if (flag == 0) {
			a[count] = i;
			count++;
		}
	}

	for (int l = 0; l < arrsize; l++) {
		int m = sqrt(n);
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < m; j++) {
				if (n == pow(a[l], i)*pow(a[l + 1], j)) {
					
					cout << "Yes";
					return 0;
				}

			}
		}


	}

	cout << "No";


}
0