結果

問題 No.677 10^Nの約数
ユーザー ku_material_ro
提出日時 2018-05-18 00:56:18
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 532 bytes
コンパイル時間 762 ms
コンパイル使用メモリ 80,300 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-28 13:39:04
合計ジャッジ時間 1,450 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <math.h>
#include <vector>
#include<stdio.h>
#include<algorithm>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define SZ(x) ((int)(x).size())

using namespace std;

int main(){
	int n;
	vector<ll> a;
	
	cin >> n;
	//a.reserve(pow(n+1,2));
	REP(i, n+1) {
		REP(j, n+1) {
			a.push_back(pow(2, i)*pow(5, j));
		}
	}
	
	sort(a.begin(),a.end());
	REP(i, SZ(a)) {
		cout << a[i] << endl;
	}
	return 0;
}
0