結果

問題 No.677 10^Nの約数
ユーザー Shawn stayCShawn stayC
提出日時 2020-07-07 23:21:55
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 414 bytes
コンパイル時間 1,560 ms
コンパイル使用メモリ 172,108 KB
実行使用メモリ 13,756 KB
最終ジャッジ日時 2024-04-09 21:18:27
合計ジャッジ時間 7,485 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

int main(){
	ll n; cin>>n;
	n=pow(10,n);
	vector<ll> v;
	for(ll i=1; i*i<=n; i++){
		if(n%i==0){
			v.push_back(i);
			v.push_back(n/i);
		}
	}
	sort(all(v));
	UNIQUE(v);
	for(auto x:v) cout<<x<<endl;
}
0