#include #include #include using namespace std; int main(){ int A, B; cin >> A >> B; vector money; for(int i = 0; i <= B; i++){ for(int j = 0; j <= A; j++){ money.push_back(i * 5 + j); } } sort(money.begin(), money.end()); int back = 0; for(int i = 1; i < money.size(); i++){ if(back != money[i]){ cout << money[i] << endl; } back = money[i]; } }