結果

問題 No.677 10^Nの約数
ユーザー IchimiyaIchimiya
提出日時 2020-07-27 22:42:30
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 1,750 ms
コンパイル使用メモリ 169,436 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-11 06:05:03
合計ジャッジ時間 2,888 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
const int64_t MOD = 1e9 + 7;

int main() {
	int N;
	cin >> N;

	vector<int64_t> v;
	for (int i = 0; i <= N; i++) {
		int64_t n = 1;
		int j = i;
		while (j > 0) {
			n *= 2;
			j--;
		}
		//cout << n << endl;

		for (int k = 0; k <= N; k++) {
			int64_t m = 1;
			int l = k;
			while (l > 0) {
				m *= 5;
				l--;
			}
			//cout << m << endl;

			v.push_back(n * m);
		}
	}

	sort(v.begin(), v.end());

	for (int i = 0; i < v.size(); i++) {
		cout << v.at(i) << endl;
	}
}
0