[aplusdev] Neophyte to A+ tries out New Scientist puzzle
Andrew Reilly
aar at wadsworth.org
Mon Mar 5 17:34:52 EST 2001
At the risk of being scolded to RTFM I am asking for feedback
on the script: http://www.albany.edu/~areilly/newsci.jpg. Although
it returns the correct answer I am wondering if someone familiar with
A+ might provide pointers to improve the code....Thanks.
>This puzzle was originally posted on a mailing list for the Icon
>programming language. Thought members of this group might also
>want to give it a shot.
>VIER and NEUN represent 4-digit squares, each letter denoting a
>distinct digit. You are asked to find the value of each, given the
>further requirement that each uniquely determines the other.
>The "further requirement" means that of the numerous pairs of
>answers, choose the one in which each number only appears once
>in all of the pairs.
>Morten Kromberg <mkromberg at INSIGHT.DK> wrote:
>Take a look at http://www.ckkronborg.dk/nsapl.htm for one APL solution
>I've put an image of iton the web page to avoid problems with APL special
>symbols.
> Morten
Here is my uuencoded script pictured in my webpage:
begin 644 .
M*&8@<F5D=6-E*2!V.GMR^SXP(W8[("AI^Z(Q*R-V*2!D;R!R^W(@9B ^*#$K
M:2DC=GT at XR!O<&5R871O<G,*XR!N97=S8VD@=7-E<R L+R ]+R!W:&EC:"!A
M<F4@;F]T('!A<G0@;V8 at 82L*"F$@*&8@;W5T97(I(&(Z>W+[*"@C82DL(V(I
MTCPP(V$[*&G[(V$I(&1O(');:3M=^RAI(V$I(&:A(&([<GT*XR!S:6UI;&%R
M;'D@;F5W<V-I('5S97, at RBXL(&%N9" ]+BP@=VAI8V@@87)E(&YO="!P87)T
M(&]F(&$K"@IN97=S8VDZ>W+[+')E9'5C92 H/#0I[J%R("QO=71E<B!R^R at S
M,2LQ*\DV."DJ,CL*(" @(" @(.,@($%!04%!04$@0D)"0D(@0T-#0T-#0T-#
M0R!$1$1$1$1$1$1$1$0*(" @(" @(.-$.F-O;7!U=&4@<&]S<VEB;&4@<W%U
M87)E<SL at 0SH@9F]R;2!P86ER<R!O9B!S<75A<F5S"B @(" @("#C0CIF;W)M
M870 at 96%C:"!P86ER.R!!.B!C871E;F%T92 T-C(T('!A:7)S('1O(&QE;F=T
M:" X('-T<FEN9W,*(" @(" @(.,*(" @(" @("!R^RA><F5D=6-E0#$@/7)E
M9'5C94 QH2 H<EL[," S73MR6SLQ(#9=*2DO/$ Q('(["B @(" @("#C(" @
M04%!04%!04%!($)"0D)"0D)"0D(@($-#0T-#0T-#0T-#0T-#0R @1$1$1 H@
M(" @(" @XR!$.G)E<75I<F4@)TY%54Y6245!)R!P871T97)N+&5G(&1U<',@
M870@*$E/^_TP*2 P+#, at 86YD(#$L-BX*(" @(" @(.,@("!296UO=F4@<F]W
M<R!O9B!R(&UI<W-I;F<@=&AE<V4 at 9'5P<R!B>3L at 0D,Z8VAE8VMI;F<@<&%I
M<G=I<V4@"B @(" @("#C(" @:61E;G1I='D[($$Z(&-H96-K:6YG(&)O=&@@
M:61E;G1I=&EE<R!H;VQD+ at H@(" @(" @XPH@(" @(" @('+[*#8]+#[2H55.
M25%51:$@<BDO<CL@"B @(" @("#C(%!A='1E<FX@<F5Q=6ER97, at -B!U;FEQ
M=64 at 8VAA<F%C=&5R<PH@(" @(" @XPH@(" @(" @('+[*#(]*R\^=2^A=?LK
M+Z$^H5XOH:%T(#UO=71E<J$@=?M53DE1546A('3[*-)R*=HL]#3:0#$@/G(I
M+W(["B @(" @("#C("!+02!"0D-#0T-#($1$1$5%1D9&1D='1T='1T='1T='
M($E)24E)24D@("!*2DI*2DI*2DI*2DI*2DM+2R *(" @(" @(., at 2SIS96QE
M8W0@<F]W(&9R;VT@<B!W:71H('5N:7%U92!E;G1R:65S(&EN(&5A8V@@9W)O
M=7 @;V8 at -"!C;VQU;6YS"B @(" @("#C($HZ--H@<W!L:70@<W1R:6YG<R!I
M;G1O('1W;R!W;W)D<RP@*-)R*=H@;F5S=',@*#%S="!W<F1S.R R;F0@=W)D
M<RD*(" @(" @(., at 1TDZ(&9I;F0@;V-C=7)R86YC92!O9B!U;FEQ=64@,7-T
M(&%N9" R;F0@=W)D<SL at 1$5&.B!C;W5N="!F<F5Q=65N8WD*(" @(" @(.,@
M0SIE>'!A;F0@=2!S;R!E86-H(&AA<R#2<B!E;&5M96YT<SL at 0CIA9&0 at 9G)E
M<7,@;V8@,7-T(&%N9" R;F0@=W)D<PH@(" @(" @XR!!.G5N:7%U92!R;W=S
J(&EN('(@<VAO=6QD(&AA=F4@,B!U;FEQ=64@=V]R9',*(" @(" @(')]
end
=================
Andrew A. Reilly
Internet: Andrew.Reilly at Wadsworth.Org
Voice: 518-473-3493 FAX:518-474-2769
Beeper:518-498-9394.
Wadsworth Center for Labs and Research. Rm. C543
Empire State Plaza. P.O. Box 509.
Albany, NY 12201-0509
More information about the apluslist
mailing list