結果

問題 No.677 10^Nの約数
ユーザー aaaaaa
提出日時 2018-09-29 20:25:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,091 bytes
コンパイル時間 1,075 ms
コンパイル使用メモリ 101,616 KB
実行使用メモリ 13,760 KB
最終ジャッジ日時 2024-04-20 13:06:15
合計ジャッジ時間 7,102 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
13,760 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 3 ms
6,944 KB
testcase_09 AC 5 ms
6,940 KB
testcase_10 AC 9 ms
6,940 KB
testcase_11 AC 12 ms
6,944 KB
testcase_12 AC 21 ms
6,944 KB
testcase_13 AC 52 ms
6,940 KB
testcase_14 AC 145 ms
6,940 KB
testcase_15 AC 450 ms
6,940 KB
testcase_16 AC 1,381 ms
6,940 KB
testcase_17 TLE -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>

using namespace std;


int main() {
	long long  i, j, k;
	vector<vector<long long>>list(0, vector<long long>(2));


	cin >> k;

	long long bb = -1, p=1;

	for (i = 1; i <= pow(10,k) / 2 + 1; i+=p) {
		long long num = pow(10, k);
		if ( num % i == 0) {
			if (i == num / i) {
				//cout << i << " " << num / i << endl;
				cout << i << endl;
				break;
			}
			if ( i == bb) {
				break;
			}
			//cout  << i << " " << num / i << endl;
			cout << i << endl;
			bb = num / i;
			list.push_back({ i, num / i });
		}

		if (i >= 100000)p = 5;
	}

//	cout << "syuryou" << endl;

	for (i = list.size() - 1; i >= 0; i--) {
		//cout << list[i][1] << " " << list[i][0] << endl;
		cout << list[i][1] << endl;
	}


	//cout << "syuryou2" << endl;








	getchar();
	getchar();
	return 0;
}
0