Skip to content

Instantly share code, notes, and snippets.

@Kuniwak
Last active January 1, 2016 10:19
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 Kuniwak/8130419 to your computer and use it in GitHub Desktop.
Save Kuniwak/8130419 to your computer and use it in GitHub Desktop.
クロノス・クラウン合同会社 柳井 政和@fizzbuzzダンジョンさんの問題 「FizzBuzzダンジョン」の回答。https://codeiq.jp/ace/yanai_masakazu_fizzbuzz/

コードの経過

L1

  • 21文字。妙にams.jsに引っ張られた回答。たぶん|0を使いたかっただけ。反省。

    i%15?i%5?!(i%3)|0:2:3

L2の回答

  • 15文字

    !(i%3)+!(i%5)*2

L3の回答

  • 27文字

    1*'100'[i%3]+2*'10000'[i%5]
  • 23文字

    '300102100120100'[i%15]

L4の回答

  • 37文字

    Boolean(arr[i/3])+2*Boolean(arr[i/5])
  • 27文字

    2*(i/5 in arr)+(i/3 in arr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment