Advertisement
Spocoman

Stupid Password Generator

Oct 7th, 2023
1,323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int n, l;
  8.     cin >> n >> l;
  9.  
  10.     for (int a = 1; a <= n; a++) {
  11.         for (int b = 1; b <= n; b++) {
  12.             for (int c = 97; c < 97 + l; c++) {
  13.                 for (int d = 97; d < 97 + l; d++) {
  14.                     for (int e = max(a, b) + 1; e <= n; e++) {
  15.                         cout << a << b << (char)c << (char)d << e << ' ';
  16.                     }
  17.                 }
  18.             }
  19.         }
  20.     }
  21.    
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement