diff options
author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2021-08-27 19:16:00 +0200 |
---|---|---|
committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2021-08-27 19:16:00 +0200 |
commit | 6fcb28bbf34fc81f40592eaa71cf2b8afbfd126d (patch) | |
tree | c00ba093a2e19e99353f3c494a27f5fc85e97e91 | |
parent | 8519b1be179749f445eb72c49dee80a2b054553a (diff) |
Problem 33
-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 |