結果

問題 No.542 1円玉と5円玉
ユーザー toto6114
提出日時 2019-07-02 22:50:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 299 bytes
コンパイル時間 862 ms
コンパイル使用メモリ 79,212 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 20:03:44
合計ジャッジ時間 1,327 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
int main() {
  int a,b;
  cin >> a >> b;
  map<int,int> mp;
  for(int i=0; i<=a; i++) {
      for(int j=0; j<=b; j++) {
          mp[i+j*5]++;
      }
  }
  mp.erase(0);
  for(auto a:mp) {
      cout << a.first << endl;
  }
}
0