結果

問題 No.677 10^Nの約数
ユーザー m1025o1184tm1025o1184t
提出日時 2019-12-10 01:58:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 509 bytes
コンパイル時間 1,772 ms
コンパイル使用メモリ 171,188 KB
実行使用メモリ 8,468 KB
最終ジャッジ日時 2023-09-05 17:15:50
合計ジャッジ時間 7,095 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 WA -
testcase_11 AC 5 ms
4,376 KB
testcase_12 WA -
testcase_13 AC 38 ms
4,376 KB
testcase_14 WA -
testcase_15 AC 370 ms
4,376 KB
testcase_16 WA -
testcase_17 TLE -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef long long ll;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;

	ll res = pow(10, n);

	vector<ll> ans;

	for (int i = 1; i <= sqrt(res); ++i) {
		if (res % i == 0 ) {
			ans.push_back(i);
			if (i * i != res) {
				ans.push_back(res / i);
			}
		}
	}
	sort(all(ans));
	int k = (n + 1) * (n + 1);
	rep(i, k) {
		cout << ans[i] << endl;
	}
	return 0;
}
0