Skip to content

Instantly share code, notes, and snippets.

@yehara
Last active December 17, 2015 05:08
Show Gist options
  • Save yehara/6d042a21d8592ae7188a to your computer and use it in GitHub Desktop.
Save yehara/6d042a21d8592ae7188a to your computer and use it in GitHub Desktop.
マヨイドーロ
c=b=1
((gets.to_i+1)/2).times{c,b=c*2+b,c+b}
p c-1
@yehara
Copy link
Author

yehara commented Dec 17, 2015

「結城浩の「マヨイドーロ問題」」でコードゴルフしてみました。51バイト。
問題: https://codeiq.jp/q/2549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment