Last active
December 17, 2015 05:08
-
-
Save yehara/6d042a21d8592ae7188a to your computer and use it in GitHub Desktop.
マヨイドーロ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c=b=1 | |
((gets.to_i+1)/2).times{c,b=c*2+b,c+b} | |
p c-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
「結城浩の「マヨイドーロ問題」」でコードゴルフしてみました。51バイト。
問題: https://codeiq.jp/q/2549