Created
July 14, 2017 20:45
-
-
Save greymd/ea807f29daecfd213e38aad97cc08040 to your computer and use it in GitHub Desktop.
【話題の一行問題】東大数学2015第5問【2015Cmが偶数】をEgisonで解く
This file contains hidden or 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
; 【話題の一行問題】東大数学2015第5問【2015Cmが偶数】をEgisonで解く | |
; https://www.youtube.com/watch?v=MfrT_QGCkRo | |
(define $main | |
(lambda [$argv] | |
(each display | |
(match | |
(map 1#(2#[%1 %2 (modulo %2 2)] %1 (comb 2015 %1)) | |
(take 2015 nats)) | |
(list [integer integer integer]) | |
{[<join $a <cons (& $b [_ _ ,0]) $c>> (append a {b})]} | |
)))) | |
; [1 2015 1] | |
; [2 2029105 1] | |
; [3 1361529455 1] | |
; [4 684849315865 1] | |
; [5 275446394840903 1] | |
; [6 92274542271702505 1] | |
; [7 26482793631978618935 1] | |
; [8 6647181201626633352685 1] | |
; [9 1482321407962739237648755 1] | |
; [10 297353674437325491072340253 1] | |
; [11 54199465204257964509094746115 1] | |
; [12 9051310689111080073018822601205 1] | |
; [13 1394598100791499491250515513093355 1] | |
; [14 199427528413184427248823718372349765 1] | |
; [15 26603632290318802594993084030871458651 1] | |
; [16 3325454036289850324374135503858932331375 1] | |
; [17 391034271679024164613170404247882690024625 1] | |
; [18 43404804156371682272061914871514978592733375 1] | |
; [19 4562073363172328920910928631495548013141502625 1] | |
; [20 455294921644598426306910677423255691711521961975 1] | |
; [21 43253017556236850499156514355209290712594586387625 1] | |
; [22 3920296227597103631605367710194878440041527511678375 1] | |
; [23 339702190504392501643021645496451857869685405685869625 1] | |
; [24 28195281811864577636370796576205504203183888671927178875 1] | |
; [25 2245472243496894962960570239329006354741564893832280525605 1] | |
; [26 171864990944570037549674414471720101766758236104855317152075 1] | |
; [27 12660720999583326099492681866083380830151190059724341696869525 1] | |
; [28 898911190970416153063980412491920038940734494240428260477736275 1] | |
; [29 61590915050283341246142382055911900599146187588128653571353861325 1] | |
; [30 4077318576328757190494625692101367819663477618334116866423625619715 1] | |
; [31 261079915290728484617155870929716616839742034593329741285512801778525 1] | |
; [32 16186954748025166046263663997642430244064006144786443959701793710268550 0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment