結果
| 問題 | No.677 10^Nの約数 | 
| コンテスト | |
| ユーザー |  aaa | 
| 提出日時 | 2018-09-29 20:25:04 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 1,091 bytes | 
| コンパイル時間 | 1,002 ms | 
| コンパイル使用メモリ | 102,088 KB | 
| 実行使用メモリ | 13,632 KB | 
| 最終ジャッジ日時 | 2024-10-12 08:30:37 | 
| 合計ジャッジ時間 | 6,930 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 15 TLE * 1 -- * 1 | 
ソースコード
#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;
}
            
            
            
        