結果

問題 No.542 1円玉と5円玉
ユーザー kikagekikage
提出日時 2020-04-03 00:53:18
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 62,168 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 15:28:55
合計ジャッジ時間 1,180 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <set>
using namespace std;
int main(){
    set<int> coin;
    int A,B;
    cin >> A >> B;
    for(int a=0;a<=A;a++){
        for(int b=(a>0?0:1);b<=B;b++){
            coin.insert(1*a+5*b);
        }
    }
    for(auto it=coin.begin();it!=coin.end();it++){
        cout << *it << endl;
    }
    return 0;
}
0