結果

問題 No.542 1円玉と5円玉
ユーザー a01sa01to
提出日時 2024-02-25 00:23:55
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 1,978 ms
コンパイル使用メモリ 198,808 KB
最終ジャッジ日時 2025-02-19 21:15:01
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
  #include "settings/debug.cpp"
  #define _GLIBCXX_DEBUG
#else
  #define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;

int main() {
  int a, b;
  cin >> a >> b;
  set<int> s;
  for (int i = 0; i <= a; i++) {
    for (int j = 0; j <= b; j++) {
      s.insert(i + 5 * j);
    }
  }
  s.erase(0);
  for (auto x : s) cout << x << endl;
  return 0;
}
0