Last active
February 19, 2016 17:08
-
-
Save buyoh/795505808dd657893701 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
// http://d.hatena.ne.jp/Ozy/20160202 | |
long long a=1,b[9],s;main(z){for(;99+z;a=(b[z&3]+=a)-a+b[--z&3])printf("%lld\n",s+=a);} | |
// 2016/02/20 02:00 追記 | |
long long a=1,b[9],s; // a以外は0で初期化される | |
int main(){ | |
int z=1; // 引数argc=1 | |
for(;99+z != 0 ;){ | |
printf("%lld\n",s+=a); | |
a=(b[z&3]+=a) | |
-a + b[ (--z) &3]; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment