結果

問題 No.542 1円玉と5円玉
ユーザー yamyam122
提出日時 2017-09-12 14:03:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 560 ms
コンパイル使用メモリ 63,736 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 17:17:36
合計ジャッジ時間 1,251 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <set>

int main() {
	int A, B;
	std::cin >> A >> B; std::cin.ignore();

	std::set<int> st;
	for (int i = 0; i <= A; i++) {
		for (int j = 0; j <= B; j++) {
			st.insert(i + j * 5);
		}
	}
	st.erase(0);

	for (auto x : st) {
		std::cout << x << std::endl;
	}

	return 0;
}
0