Skip to content

Instantly share code, notes, and snippets.

@butackle
Created August 10, 2019 05:55
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 butackle/7eee0cdaeb98f0d47c02816175b612e8 to your computer and use it in GitHub Desktop.
Save butackle/7eee0cdaeb98f0d47c02816175b612e8 to your computer and use it in GitHub Desktop.
シェル芸
console.log([...Array(9999)].map((v,i) => `${ i }`.split("").map((x) => x-0)).filter((a) => a.reduce((p,v) => p+v, 0) === 10 && !a.includes(0) && a.every((v, i) => i === a.findIndex((b) => v === b))).map((v) => v.join("")).map((s) => [`${ require("fs").readFileSync("../ShellGeiData/vol.43/nums")}`.split("\n").findIndex((c) => c.includes(s))+1, s]).filter(([v]) => v > 0).map(([l,s]) => `L${l} : ${s}`).sort())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment