Advertisement
Spocoman

01. Unique PIN Codes

Dec 31st, 2021 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function uniquePINCodes(input) {
  2.     for (let i = 2; i <= Number(input[0]); i += 2) {
  3.         for (let j = 2; j <= Number(input[1]); j++) {
  4.             if (j === 2 || j === 3 || j === 5 || j === 7) {
  5.                 for (let k = 2; k <= Number(input[2]); k++) {
  6.                     if (k === 2 || k === 4 || k === 6 || k === 8) {
  7.                         console.log(`${i} ${j} ${k}`);
  8.                     }
  9.                 }
  10.             }
  11.         }
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement