Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function passGenerator(input) {
- let n = Number(input.shift());
- let l = Number(input.shift());
- let output ="";
- for(let x1 = 1; x1 <= n; x1++) {
- for(let x2 = 1; x2 <=n; x2++){
- for(let x3 = 97; x3 <= 96+l; x3++) {
- let l1 = String.fromCharCode(x3);
- for(let x4 = 97; x4 <= 96+l; x4++) {
- let l2 = String.fromCharCode(x4)
- for(let x5 = 1; x5 <= n; x5++) {
- if (x5 > x1 && x5 >x2) {
- output+=`${x1}${x2}${l1}${l2}${x5} `
- }
- }
- }
- }
- }
- }
- console.log(output);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement