Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. function passGenerator(input) {
  2.  
  3. let n = Number(input.shift());
  4. let l = Number(input.shift());
  5. let output ="";
  6.  
  7.  
  8. for(let x1 = 1; x1 <= n; x1++) {
  9. for(let x2 = 1; x2 <=n; x2++){
  10. for(let x3 = 97; x3 <= 96+l; x3++) {
  11. let l1 = String.fromCharCode(x3);
  12. for(let x4 = 97; x4 <= 96+l; x4++) {
  13. let l2 = String.fromCharCode(x4)
  14. for(let x5 = 1; x5 <= n; x5++) {
  15. if (x5 > x1 && x5 >x2) {
  16. output+=`${x1}${x2}${l1}${l2}${x5} `
  17. }
  18.  
  19. }
  20. }
  21. }
  22. }
  23. }
  24. console.log(output);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement