(function() { | |
"use strict"; | |
let arr = []; | |
for (let i = 0; i < 1e10; ++i) { | |
if (Math.random() < 0.5) { | |
arr.push(0); | |
console.log("ズン"); | |
} else { | |
arr.push(1); | |
console.log("ドコ"); | |
if ( | |
arr[i - 1] === 0 && | |
arr[i - 2] === 0 && | |
arr[i - 3] === 0 && | |
arr[i - 4] === 0 | |
) { | |
console.log("きよし!"); | |
break; | |
} | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment