結果

問題 No.677 10^Nの約数
ユーザー dgd1724dgd1724
提出日時 2018-07-23 18:25:46
言語 C++11
(gcc 11.4.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 493 bytes
コンパイル時間 423 ms
コンパイル使用メモリ 59,536 KB
最終ジャッジ日時 2024-04-27 02:35:27
合計ジャッジ時間 903 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:69: error: ‘pow’ is not a member of ‘std’
   16 |                         A.push_back(static_cast<long long int>(std::pow(5, i) * std::pow(2, j)));
      |                                                                     ^~~
main.cpp:16:86: error: ‘pow’ is not a member of ‘std’
   16 |                         A.push_back(static_cast<long long int>(std::pow(5, i) * std::pow(2, j)));
      |                                                                                      ^~~

ソースコード

diff #

#include <fstream>
#include <iostream>
#include <vector>
#include <algorithm>

int main() {

	//std::ifstream inf("Text.txt");	std::cin.rdbuf(inf.rdbuf());

	int N;
	std::cin >> N;
	std::vector<long long int> A;

	for (int i = 0; i <= N; i++) {
		for (int j = 0; j <= N; j++) {
			A.push_back(static_cast<long long int>(std::pow(5, i) * std::pow(2, j)));
		}
	}

	std::sort(A.begin(), A.end());

	for (unsigned int i = 0; i < A.size(); i++) {
		std::cout << A[i] << std::endl;
	}

	return 0;
}
0