Submit Search
Upload
Mathematicaでgolf
•
0 likes
•
1,540 views
A
aomori ringo
Follow
Report
Share
Report
Share
1 of 31
Download now
Download to read offline
Recommended
201308 回路部ワークショップ(ランプ)資料
201308 回路部ワークショップ(ランプ)資料
Ryusuke Izumida
La Recreación
La Recreación
ZaphodNovack
RCEC Email 5.19.03 (c)
RCEC Email 5.19.03 (c)
Obama White House
OPIC Released Documents 21-30
OPIC Released Documents 21-30
Obama White House
CAR Email 3.25.02
CAR Email 3.25.02
Obama White House
Handwritten Notes (f)
Handwritten Notes (f)
Obama White House
Summer camp for kids in Kolkata
Summer camp for kids in Kolkata
Genius Kids India
Bombardier reference
Bombardier reference
Ashley Jones
Recommended
201308 回路部ワークショップ(ランプ)資料
201308 回路部ワークショップ(ランプ)資料
Ryusuke Izumida
La Recreación
La Recreación
ZaphodNovack
RCEC Email 5.19.03 (c)
RCEC Email 5.19.03 (c)
Obama White House
OPIC Released Documents 21-30
OPIC Released Documents 21-30
Obama White House
CAR Email 3.25.02
CAR Email 3.25.02
Obama White House
Handwritten Notes (f)
Handwritten Notes (f)
Obama White House
Summer camp for kids in Kolkata
Summer camp for kids in Kolkata
Genius Kids India
Bombardier reference
Bombardier reference
Ashley Jones
TGIX sept 2/9/10
TGIX sept 2/9/10
Illuminati Quiz
Tce bacia do RIO carimã
Tce bacia do RIO carimã
Dafné José
August 1980 The Eleventh Annual Report Of The Council On Env
August 1980 The Eleventh Annual Report Of The Council On Env
Obama White House
SERA Email 12.23.02
SERA Email 12.23.02
Obama White House
FOTOinformator 1/2016
FOTOinformator 1/2016
Zbigniew Wlodarski
Press release Yan Pei-Ming’s “PaintingThe History” Exhibition 1.9.12 - English
Press release Yan Pei-Ming’s “PaintingThe History” Exhibition 1.9.12 - English
Qma Markdept
MOJO-Ad New Business Campaign
MOJO-Ad New Business Campaign
Breckyn Crocker
回想支援ツールNFC仏壇
回想支援ツールNFC仏壇
Yasuhiro Ohsaka
~ Cloud First から Cloud Optimized へ ~ .NET on Cloud が描くモダナイゼーション
~ Cloud First から Cloud Optimized へ ~ .NET on Cloud が描くモダナイゼーション
Akira Inoue
4 the rest of_wisconsin
4 the rest of_wisconsin
Lynnwood Rotary
Investment in Technology for non-profit @ Diffusion Pune 2012
Investment in Technology for non-profit @ Diffusion Pune 2012
Net Impact Pune Professional Chapter
Hmc installation .
Hmc installation .
Ksd Che
Всероссийский литературный фестиваль "Белое птяно"
Всероссийский литературный фестиваль "Белое птяно"
Novosibirsk regional universal research library
LibreOffice No coding extention(ClipArt)
LibreOffice No coding extention(ClipArt)
Makoto Takizawa
Q3 2014 Investor Factbook
Q3 2014 Investor Factbook
TMUS_IR
Team-Based Product Ownership
Team-Based Product Ownership
Mark Weeks
Guião actividade em GSP - Perspectiva de cubo
Guião actividade em GSP - Perspectiva de cubo
Ana Paula Jesus
Distributed Systems 第10章 Distributed Object-Based Systems (後編)
Distributed Systems 第10章 Distributed Object-Based Systems (後編)
aomori ringo
Mathematicaをはじめよう
Mathematicaをはじめよう
aomori ringo
Distributed Systems 第10章 Distributed Object-Based Systems
Distributed Systems 第10章 Distributed Object-Based Systems
aomori ringo
Distributed Systems 第1章 Introduction
Distributed Systems 第1章 Introduction
aomori ringo
Source monitorと複雑度のはなし
Source monitorと複雑度のはなし
aomori ringo
More Related Content
Viewers also liked
TGIX sept 2/9/10
TGIX sept 2/9/10
Illuminati Quiz
Tce bacia do RIO carimã
Tce bacia do RIO carimã
Dafné José
August 1980 The Eleventh Annual Report Of The Council On Env
August 1980 The Eleventh Annual Report Of The Council On Env
Obama White House
SERA Email 12.23.02
SERA Email 12.23.02
Obama White House
FOTOinformator 1/2016
FOTOinformator 1/2016
Zbigniew Wlodarski
Press release Yan Pei-Ming’s “PaintingThe History” Exhibition 1.9.12 - English
Press release Yan Pei-Ming’s “PaintingThe History” Exhibition 1.9.12 - English
Qma Markdept
MOJO-Ad New Business Campaign
MOJO-Ad New Business Campaign
Breckyn Crocker
回想支援ツールNFC仏壇
回想支援ツールNFC仏壇
Yasuhiro Ohsaka
~ Cloud First から Cloud Optimized へ ~ .NET on Cloud が描くモダナイゼーション
~ Cloud First から Cloud Optimized へ ~ .NET on Cloud が描くモダナイゼーション
Akira Inoue
4 the rest of_wisconsin
4 the rest of_wisconsin
Lynnwood Rotary
Investment in Technology for non-profit @ Diffusion Pune 2012
Investment in Technology for non-profit @ Diffusion Pune 2012
Net Impact Pune Professional Chapter
Hmc installation .
Hmc installation .
Ksd Che
Всероссийский литературный фестиваль "Белое птяно"
Всероссийский литературный фестиваль "Белое птяно"
Novosibirsk regional universal research library
LibreOffice No coding extention(ClipArt)
LibreOffice No coding extention(ClipArt)
Makoto Takizawa
Q3 2014 Investor Factbook
Q3 2014 Investor Factbook
TMUS_IR
Team-Based Product Ownership
Team-Based Product Ownership
Mark Weeks
Guião actividade em GSP - Perspectiva de cubo
Guião actividade em GSP - Perspectiva de cubo
Ana Paula Jesus
Viewers also liked
(17)
TGIX sept 2/9/10
TGIX sept 2/9/10
Tce bacia do RIO carimã
Tce bacia do RIO carimã
August 1980 The Eleventh Annual Report Of The Council On Env
August 1980 The Eleventh Annual Report Of The Council On Env
SERA Email 12.23.02
SERA Email 12.23.02
FOTOinformator 1/2016
FOTOinformator 1/2016
Press release Yan Pei-Ming’s “PaintingThe History” Exhibition 1.9.12 - English
Press release Yan Pei-Ming’s “PaintingThe History” Exhibition 1.9.12 - English
MOJO-Ad New Business Campaign
MOJO-Ad New Business Campaign
回想支援ツールNFC仏壇
回想支援ツールNFC仏壇
~ Cloud First から Cloud Optimized へ ~ .NET on Cloud が描くモダナイゼーション
~ Cloud First から Cloud Optimized へ ~ .NET on Cloud が描くモダナイゼーション
4 the rest of_wisconsin
4 the rest of_wisconsin
Investment in Technology for non-profit @ Diffusion Pune 2012
Investment in Technology for non-profit @ Diffusion Pune 2012
Hmc installation .
Hmc installation .
Всероссийский литературный фестиваль "Белое птяно"
Всероссийский литературный фестиваль "Белое птяно"
LibreOffice No coding extention(ClipArt)
LibreOffice No coding extention(ClipArt)
Q3 2014 Investor Factbook
Q3 2014 Investor Factbook
Team-Based Product Ownership
Team-Based Product Ownership
Guião actividade em GSP - Perspectiva de cubo
Guião actividade em GSP - Perspectiva de cubo
More from aomori ringo
Distributed Systems 第10章 Distributed Object-Based Systems (後編)
Distributed Systems 第10章 Distributed Object-Based Systems (後編)
aomori ringo
Mathematicaをはじめよう
Mathematicaをはじめよう
aomori ringo
Distributed Systems 第10章 Distributed Object-Based Systems
Distributed Systems 第10章 Distributed Object-Based Systems
aomori ringo
Distributed Systems 第1章 Introduction
Distributed Systems 第1章 Introduction
aomori ringo
Source monitorと複雑度のはなし
Source monitorと複雑度のはなし
aomori ringo
md5のアルゴリズム
md5のアルゴリズム
aomori ringo
すごいHaskell楽しく学ぼう 第6章
すごいHaskell楽しく学ぼう 第6章
aomori ringo
More from aomori ringo
(7)
Distributed Systems 第10章 Distributed Object-Based Systems (後編)
Distributed Systems 第10章 Distributed Object-Based Systems (後編)
Mathematicaをはじめよう
Mathematicaをはじめよう
Distributed Systems 第10章 Distributed Object-Based Systems
Distributed Systems 第10章 Distributed Object-Based Systems
Distributed Systems 第1章 Introduction
Distributed Systems 第1章 Introduction
Source monitorと複雑度のはなし
Source monitorと複雑度のはなし
md5のアルゴリズム
md5のアルゴリズム
すごいHaskell楽しく学ぼう 第6章
すごいHaskell楽しく学ぼう 第6章
Mathematicaでgolf
1.
@aomoriringo
2.
ゴルフ Code Golf ◦ 少ない打数でカップにボール入れる ◦
少ない文字数で目的の出力をする
3.
ショートコーディングのサイト http://golf.shinh.org/ 83の言語に対応 (Mathematicaは当然未対応) 言語別の文字数ランキングも閲覧可
4.
Mathematicaで勝手に ランキング1位を目指してみよう
5.
“Hello, world!” と出力せよ。 Input Output ◦
なし ◦ Hello, world!
6.
Hello, world! (13byte) “Hello,
world!” (15byte)
7.
“Hello, world!” (15 byte)
8.
Rank Lang Size 2 bash 11 4 PHP m4 fish A+ sed 13 1 3 5 goruby Zsh Ruby Perl Universal Lambda 1 12 14
9.
1から100までの整数を出力せよ。 ただし 3の倍数のときは”Fizz”, 5の倍数のときは”Buzz”, 15の倍数のときは”FizzBuzz”, と数字の代わりに出力せよ。 Output 1 2
Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 . . .
10.
Rank Lang 2 GolfScript 1 3 4 5 6 7 8 9 10 Size FlogScript 36 Bash 41 Perl6 J goruby Vi Perl Z80 Postscript Ruby 37 44 45 46 47 48 49 50
11.
自然定数eを100桁表示せよ。 Input Output ◦ なし ◦ 27182818284590452353602874713526624977 57247093699959574966967627724076630353 5475945713821785251664274
12.
N[E,101]
13.
2.71828182845904523536028747135266 2497757247093699959574966967627724 0766303535475945713821785251664274
14.
2.71828182845904523536028747135266 2497757247093699959574966967627724 0766303535475945713821785251664274 2718281828459045235360287471352662 4977572470936999595749669676277240 766303535475945713821785251664274
15.
N[E,101] 2.718281828459045235360287471352662 4977572470936999595749669676277240 766303535475945713821785251664274
16.
ToString[N[E,101]] “2.718281828459045235360287471352662 4977572470936999595749669676277240 766303535475945713821785251664274”
17.
StringSplit[ToString[N[E,101]],”.”] {“2”,”71828182845904523536028747135266 24977572470936999595749669676277240 766303535475945713821785251664274”}
18.
“”<>StringSplit[ToString[N[E,101]],”.”] “27182818284590452353602874713526624 97757247093699959574966967627724076 6303535475945713821785251664274”
19.
“”<>ToString[E~N~101]~StringSplit~”.” “27182818284590452353602874713526624 97757247093699959574966967627724076 6303535475945713821785251664274”
20.
“”<>ToString[E~N~101]~StringSplit~”.” 37 byte
21.
Rank Lang 2 J 1 3 4 5 6 7 8 9 10 Size GolfScript 17 bc 27 goruby Ruby Perl Bash Zsh 21 30 32 33 37 Groovy dc 38 Python 41 fish 40
22.
f(1)=1, f(2)=1, f(x)=f(x-1)+f(x-2)とする. f(1)からf(46)を出力せよ. Output 1,
1, 2, 3, 5, 8, 13, 21, . . .
23.
Fibonacci[n] n番目のFibonacci数を出力する
24.
Array[f,5] {f[1],f[2],f[3],f[4],f[5]}
25.
Array[Fibonacci,5] {1,1,2,3,5}
26.
Array[Fibonacci,46]
27.
Array[Fibonacci,46] Fibonacci~Array~46
28.
Array[Fibonacci,46] Fibonacci~Array~46 18byte
29.
Rank Lang 2 GolfScript 1 3 4 5 6 7 8 9 Size FlogScript 12 PostScript 17 Minus J 13 18 dc 19 vi 22 A+ Bash fish 25 goruby Perl6 Ruby bc 21 24
30.
Code Golf コワイ
31.
皆さんもお好きな言語で お試しください
Download now