結果

問題 No.3029 素因数
ユーザー e869120e869120
提出日時 2017-03-31 23:08:51
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 880 bytes
コンパイル時間 2,755 ms
コンパイル使用メモリ 73,132 KB
実行使用メモリ 21,040 KB
最終ジャッジ日時 2023-09-21 11:22:38
合計ジャッジ時間 6,877 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,116 KB
testcase_01 AC 43 ms
4,376 KB
testcase_02 AC 82 ms
4,380 KB
testcase_03 AC 86 ms
5,220 KB
testcase_04 AC 124 ms
4,376 KB
testcase_05 AC 142 ms
20,536 KB
testcase_06 AC 166 ms
5,112 KB
testcase_07 AC 203 ms
4,376 KB
testcase_08 AC 83 ms
4,376 KB
testcase_09 AC 93 ms
11,984 KB
testcase_10 WA -
testcase_11 AC 130 ms
9,252 KB
testcase_12 AC 133 ms
11,456 KB
testcase_13 AC 174 ms
12,352 KB
testcase_14 AC 163 ms
4,380 KB
testcase_15 AC 44 ms
4,380 KB
testcase_16 AC 43 ms
4,376 KB
testcase_17 AC 169 ms
8,728 KB
testcase_18 AC 3 ms
4,376 KB
testcase_19 WA -
testcase_20 AC 184 ms
21,040 KB
testcase_21 AC 3 ms
4,376 KB
testcase_22 AC 21 ms
20,256 KB
testcase_23 AC 88 ms
8,840 KB
testcase_24 WA -
testcase_25 AC 163 ms
4,376 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 48 ms
7,636 KB
testcase_29 AC 123 ms
4,380 KB
testcase_30 WA -
testcase_31 AC 46 ms
5,172 KB
testcase_32 AC 123 ms
4,380 KB
testcase_33 AC 2 ms
4,376 KB
testcase_34 AC 13 ms
11,832 KB
testcase_35 AC 125 ms
5,212 KB
testcase_36 AC 53 ms
11,388 KB
testcase_37 AC 85 ms
4,392 KB
testcase_38 WA -
testcase_39 AC 165 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<ctime>
#include<vector>
using namespace std;
string U = "1309020564363155364990198847863210152708042104341971929";
vector<int>Z;
int main() {
	int M; cin >> M;
	int t = clock();
	while (clock() - t <= 40000 * (M / 8)) {}
	for (int i = 0; i < 30000 * (1 << (M % 8)); i++)Z.push_back(0);
	while (true) {
		if (U.size() <= 7) {
			U = to_string(stoi(U) % M); break;
		}
		long double T = 0, T2 = 1;
		for (int j = U.size() - 1; j >= 0; j--) { T += T2*((U[j] - '0')); T2 *= 10; }
		T /= M;
		while (T >= 10)T /= 10;
		int E = T;
		int EE = E*M;
		int J = stoi(U.substr(0, 3));
		while (J > EE * 10)EE *= 10;
		J -= EE;
		U = to_string(J) + U.substr(3, U.size() - 3);
		while (U[0] == '0')U = U.substr(1, U.size() - 1);
		//cout << U << endl;
	}
	if (U[U.size() - 1] % 2 == 0)cout << "even" << endl; else cout << "odd" << endl;
	return 0;
}
0