Page 1 of 1

Micro Challenge magazine...

Posted: Wed Apr 18, 2018 10:58 pm
by 5MinuteRetro
...did anyone here ever buy this?

Image

And did anyone here ever win the colour TV?

(I can't even begin to understand the puzzle, let alone how to enter...)

Re: Micro Challenge magazine...

Posted: Wed Apr 18, 2018 11:48 pm
by Einar Saukas
Triangles with sides: 12x35, 20x21, 21x20 and 35x12

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 12:13 am
by Einar Saukas
Here's a not very efficient solution in Sinclair BASIC, but that's probably what they expected at the time:

Code: Select all

10 FOR M=1 TO 65535
20 LET N=0: LET X$=""
30 FOR A=1 TO M
40 LET B=INT (M/A): IF A*B=M THEN LET C=INT SQR (A*A+B*B+.1): IF A*A+B*B=C*C THEN LET N=N+1: LET X$=X$+STR$ (A)+"x"+STR$ (B)+CHR$ 13
50 NEXT A
60 IF N<3 THEN NEXT M
70 PRINT X$
It takes ages to run! :)

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 12:23 am
by Kweepa
Hmm, that seems like cheating (plus it's 4, not a trio)... :)
I believe this is what they were looking for:
15,112,113
24,70,74
40,42,58

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 12:40 am
by Einar Saukas
Kweepa wrote: Thu Apr 19, 2018 12:23 am Hmm, that seems like cheating (plus it's 4, not a trio)... :)
I believe this is what they were looking for:
15,112,113
24,70,74
40,42,58
Perhaps that's what they meant, but not what they wrote!

Triangles 12x35 and 35x12 are not identical. They are different, although one is the mirror version of the other.

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 12:53 am
by Kweepa
We'll see who wins the TV! :)
Anyway, here's a modified version of your program that finds the triplet:

Code: Select all

10 FOR m=1 TO 65535
20 LET n=0: LET rm=SQR (m): PRINT AT 0,0;"Area:";m
30 FOR a=1 TO rm
40 LET b=INT (m/a): IF a*b=m THEN LET c=INT SQR (a*a+b*b+.1): IF a*a+b*b=c*c THEN LET n=n+1
50 NEXT a
60 IF n<3 THEN NEXT m
70 FOR a=1 TO rm
80 LET b=INT (m/a): IF a*b=m THEN LET c=INT SQR (a*a+b*b+.1): IF a*a+b*b=c*c THEN PRINT a;",";b;",";c
90 NEXT a

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 2:57 am
by Einar Saukas
Good work! However you are probably skipping many triangles with A=B due to rounding errors, although you are lucky that they are not part of the solution. To avoid this problem, use "LET rm=INT SQR (m+.1)".

Also the correct area is m/2 instead of m.

An even easier (but less efficient) way to discard mirrored triangles would be just adding "AND A<=B" in the original program.

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 10:50 am
by MatGubbins
I never understood the question, nor do I understand the answers that have been given. Life is great! :D

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 11:50 am
by 5MinuteRetro
MatGubbins wrote: Thu Apr 19, 2018 10:50 am I never understood the question, nor do I understand the answers that have been given. Life is great! :D
Ditto! Indeed, I originally assumed the question was related to the illustration. But the answers here made me realise that it's a general geometry puzzle, that some of the smart folks here have solved with code. I couldn't have solved it with or without code. The organisers didn't provide much of a 'workspace', did they?!

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 4:26 pm
by Nomad
It is a very optimistic advert.

It assumes a working understanding of BASIC & Maths. :lol:
Spoiler
In an age where we now do the opposite and assume our audience are windowlickers it is rather jarring to see these kind of things :lol: no thought was given to the readers that today would be 'triggered' by being unable to complete the task and it invading their safe space of mediocrity enabling them to carry on with a life unchallenged. Having spent a childhood of 'everyone wins a prize' mentality. :lol:
The past is a foreign country; they do things differently there. - L.P. Hartley
Spoiler
The Go-Between is a excellent read and well worth your time.
My alt-right rant aside. Did the magazine ever launch? It seems deliciously micro-computer, bad marketing/planning + cryptic.

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 9:41 pm
by Morkin
Heh, I wouldn't have won the TV, either back then or today... :lol:

Maybe if they'd given a couple of examples I might have worked out what they were banging on about..

Anyway, better go, it's time for me to wander round Kweepa's house to watch something on the new telly...

Re: Micro Challenge magazine...

Posted: Thu Apr 19, 2018 10:36 pm
by Kweepa
Nomad wrote: Thu Apr 19, 2018 4:26 pm Did the magazine ever launch? It seems deliciously micro-computer, bad marketing/planning + cryptic.
Looks like it somehow made it to #4, at least.
https://www.ebay.co.uk/itm/Micro-Challe ... 1136353088
Possibly parents and teachers buying it?

Re: Micro Challenge magazine...

Posted: Fri Apr 20, 2018 1:45 am
by Kweepa
Morkin wrote: Thu Apr 19, 2018 9:41 pm Anyway, better go, it's time for me to wander round Kweepa's house to watch something on the new telly...
Can you bring a 9v battery? This fancy remote control thingy didn't come with one.