結果
問題 | No.542 1円玉と5円玉 |
ユーザー | Mister |
提出日時 | 2020-04-09 16:38:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 433 bytes |
コンパイル時間 | 950 ms |
コンパイル使用メモリ | 74,352 KB |
最終ジャッジ日時 | 2025-01-09 15:28:45 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream>#include <set>void solve() {int a, b;std::cin >> a >> b;std::set<int> ss;for (int i = 0; i <= a; ++i) {for (int j = 0; j <= b; ++j) {ss.insert(i * 1 + j * 5);}}for (auto& x : ss) {if (x != 0) std::cout << x << std::endl;}}int main() {std::cin.tie(nullptr);std::ios::sync_with_stdio(false);solve();return 0;}