結果

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	set<int> s;
	int a,b; cin >> a >> b;
	for(int i=0;i<=a;i++){
		for(int j=0;j<=b;j++){
			if(i+5*j){
				s.insert(i+5*j);
			}
		}
	}
	for(auto p:s){
		printf("%d\n",p);
	}
}
0