Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- #define LINT long long int
- using namespace std;
- int main() {
- LINT a, b;
- cin >> a >> b;
- vector<vector<LINT>> vc(b + 2);
- for (LINT i = 1; i <= b; ++i)
- for (LINT j = i; j <= b; j += i) {
- vc[j].push_back(i);
- }
- int count;
- cin >> count;
- for (LINT i = a; i <= b; ++i)
- if (vc[i].size() == count) {
- for (auto x : vc[i])
- cout << x << ' ';
- cout << endl;
- }
- }
Add Comment
Please, Sign In to add comment