97HELP DESK
The task
b asks s for the root of each X: it writes X on the bus and reads back the answer.
P must receive each whole square root: 15 sends 3, and 16 sends 4. Q must receive X.
s is an SC-4, with C and D as well. b is a standard core cut to 4 lines.
The board
Key idea
Request and reply: s answers b before it passes X on to c, and keeps X in C meanwhile.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
Take away 1, then 3, then 5, and so on: how many odd numbers X has room for is its root.
Hint 2Show
While b waits for its answer, what s writes goes to b, as b is farther left than c.
Hint 3Show
So s answers b before it sends X on to c, and keeps X in C meanwhile.
Solution
Reveal the Full SolutionThe complete program for HELP DESK. Open it only when you want the answer.
The reference program
The game's own solution. It passes every test and scores exactly par on every benchmark.
sSC-4 quad
IN P0
MOV C, A
MOV B, A
MOV A, 1
L: XCH A, B
SUB B
JL G
XCH A, B
ADD 2
JMP L
G: XCH A, B
DIV 2
OUT P0
MOV A, C
OUT P0bSC-2 standard
IN P1
OUT P0
IN P0
OUT P2cSC-2 standard
IN P0
OUT P1- CYCLES
- 1066
- at par
- ENERGY
- 9342
- at par
- NODES
- 3
- at par
- INSTRUCTIONS
- 21
- at par