Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function stupidPasswordGenerator(input) {
- let n = Number(input[0]);
- let l = Number(input[1]);
- let output = "";
- for (let a = 1; a <= n; a++) {
- for (let b = 1; b <= n; b++) {
- for (let c = 97; c < 97 + l; c++) {
- for (let d = 97; d < 97 + l; d++) {
- for (let e = Math.max(a, b) + 1; e <= n; e++) {
- output += `${a}${b}${String.fromCharCode(c)}${String.fromCharCode(d)}${e} `;
- }
- }
- }
- }
- }
- console.log(output);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement