diff options
Diffstat (limited to 'problem33.ijs')
-rw-r--r-- | problem33.ijs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/problem33.ijs b/problem33.ijs new file mode 100644 index 0000000..fedc030 --- /dev/null +++ b/problem33.ijs @@ -0,0 +1,12 @@ +digits =. 10&#.^:_1 +funny =. dyad define"0 + f =. x%y + 'n1 n2' =. digits x + 'd1 d2' =. digits y + cross1 =. (n2 = d1) *. f = n1%d2 + cross2 =. (n1 = d2) *. f = n2%d1 + (1,f){~ cross1+.cross2 +) +pairs =. ,funny/~x:10+i.90 +fractions =. ;pairs#~1>pairs +problem33 =: {: 2 x: */fractions |