Skip to content

Instantly share code, notes, and snippets.

@butackle
Created April 7, 2018 06:35
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/2de549a1e40ec0e8d968359c2cbdac1c to your computer and use it in GitHub Desktop.
Save butackle/2de549a1e40ec0e8d968359c2cbdac1c to your computer and use it in GitHub Desktop.
node -e '((str = "ダンナノオオゴエ") => console.log([...Array(((num = 100) => [...Array(Math.floor(num**0.5))].map((v,i) => i+1).slice(1).reduce((p,v) => p.filter((a) => a === v || a % v !== 0), [...Array(num)].map((v,i) => i+1).slice(1))).call()[str.length-1])].reduce((p,v,j) => ((num = 100) => [...Array(Math.floor(num**0.5))].map((v,i) => i+1).slice(1).reduce((p,v) => p.filter((a) => a === v || a % v !== 0), [...Array(num)].map((v,i) => i+1).slice(1))).call().includes(j+1) ? { str: [...p.str, [...str][p.i]], i: p.i+1 } : { str: [...p.str, [..."ウルサイ"][parseInt(Math.random() * 3)]], i: p.i }, {i:0, str:[]}).str.join(""))).call()'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment