結果

問題 No.677 10^Nの約数
ユーザー mmn15277198mmn15277198
提出日時 2020-07-04 22:02:29
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 495 bytes
コンパイル時間 751 ms
コンパイル使用メモリ 83,464 KB
実行使用メモリ 8,064 KB
最終ジャッジ日時 2023-10-19 17:02:50
合計ジャッジ時間 9,207 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <math.h>
using namespace std;

int main(){
	int n;
	cin >> n;
	vector<unsigned long long> a;
	unsigned long long target=pow(10,n);
	for(unsigned long long i=1;i*i<=target;i++){
		if(target%i==0){
			a.push_back(i);
			if(i*i==target)continue;
			a.push_back(target/i);
		}
	}
	sort(a.begin(),a.end());
	for(unsigned long long i=0;i<a.size();i++){
		cout << a[i] << endl;
	}
	return 0;
}
0