Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function secretDoor(input) {
- let a = Number(input[0]);
- let b = Number(input[1]);
- let c = Number(input[2]);
- for (let i = 2; i <= a; i++) {
- for (let j = 2; j <= b; j++) {
- for (let x = 2; x <= c; x++) {
- if (i % 2 === 0 && x % 2 === 0 && (j === 2 || j === 3 || j === 5 || j === 7)) {
- console.log(`${i} ${j} ${x}`);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement