Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cmath>
- using namespace std;
- int main () {
- int n, l;
- cin >> n >> l;
- for(int a = 1; a < n; a++) {
- for(int b = 1; b < n; b++) {
- for(char c = 'a'; c < 'a' + l; c++) {
- for(char d = 'a'; d < 'a' + l; d++) {
- for(int e = 1; e <= n; e++) {
- if(e > a && e > b) {
- cout << a << b << c << d << e << " ";
- }
- }
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement