Skip to content

Instantly share code, notes, and snippets.

@aximov
Last active June 3, 2018 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aximov/6d62ef62acee604be737f84ef31cca57 to your computer and use it in GitHub Desktop.
Save aximov/6d62ef62acee604be737f84ef31cca57 to your computer and use it in GitHub Desktop.
(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