結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 13 ms
11,580 KB
testcase_02 AC 72 ms
4,376 KB
testcase_03 AC 82 ms
7,544 KB
testcase_04 AC 143 ms
4,376 KB
testcase_05 AC 149 ms
7,824 KB
testcase_06 AC 213 ms
4,504 KB
testcase_07 AC 215 ms
4,376 KB
testcase_08 AC 74 ms
4,380 KB
testcase_09 AC 142 ms
4,376 KB
testcase_10 WA -
testcase_11 AC 144 ms
4,384 KB
testcase_12 AC 146 ms
5,204 KB
testcase_13 AC 213 ms
4,376 KB
testcase_14 AC 213 ms
4,380 KB
testcase_15 AC 72 ms
4,376 KB
testcase_16 AC 5 ms
5,104 KB
testcase_17 AC 213 ms
4,376 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 WA -
testcase_20 AC 214 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 4 ms
4,380 KB
testcase_23 AC 83 ms
11,880 KB
testcase_24 WA -
testcase_25 AC 153 ms
11,736 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 73 ms
4,380 KB
testcase_29 AC 142 ms
4,380 KB
testcase_30 WA -
testcase_31 AC 72 ms
4,380 KB
testcase_32 AC 143 ms
4,380 KB
testcase_33 AC 1 ms
4,376 KB
testcase_34 AC 2 ms
4,376 KB
testcase_35 AC 144 ms
4,376 KB
testcase_36 AC 73 ms
4,376 KB
testcase_37 AC 76 ms
5,128 KB
testcase_38 WA -
testcase_39 AC 213 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 <= 70000 * (M / 11)) {}
	for (int i = 0; i < 2000 * (1 << (M % 11)); 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