Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function bankNumberGenerator(input) {
- let a = Number(input[0]);
- let b = input[1].charCodeAt(0);
- let c = input[2].charCodeAt(0);
- let d = input[3].charCodeAt(0);
- let e = Number(input[4]);
- let n = Number(input[5]);
- for (let i = a; i <= 99; i++) {
- for (let j = b; j <= 'Z'.charCodeAt(0); j++) {
- for (let k = c; k <= 'z'.charCodeAt(0); k++) {
- for (let l = d; l <= 'Z'.charCodeAt(0); l++) {
- for (let m = e; m >= 10; m--) {
- if (i % 10 == 2 && m % 10 == 5) {
- n--;
- if (n == 0) {
- console.log(`${i}${String.fromCharCode(j)}${String.fromCharCode(k)}${String.fromCharCode(l)}${m}`);
- return;
- }
- }
- }
- }
- }
- }
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement