# Stop the robot by changing value of variable Z

You're a computer security expert (i.e a hacker who doesn't break law). Your neighbour is infamous professor MacGoofy himself. He specializes in designing programming languages and programming languages that he designs are frequently controversial for his strange design choices. This time MacGoofy needs your help A.S.A.P.! You get an emergency phone call from MacGoofy, a robot on which MacGoofy tried his new programming language Romalog is trying its best to kill him right now! MacGoofy barricaded his room, but it won't stop the robot for very long.

MacGoofy gives you the password to distantly access the code of robot but warns you that with this access level you can change the value of only one integer variable and that you have only one attempt. He also mentions, that any integer variable can be equal to an integer that has its absolute value less or equal to 3999 and if you enter anything else (like a letter or a fraction, 40000, etc), then your input will be rejected and the code won't be changed (i.e. you will waste your only attempt). You also can't "freeze" the robot by giving him too big numbers to compute, it has a quantum-optical processor that can quickly process any computations that result in a number that is less than googol by the power of googol.

You quickly load your computer and then find the suspicious while-cycle that keeps the robot active for some reason. Maybe if it will break out of this cycle the robot will stop? Here is the condition of this cycle:

WHILE IS_THIS_NUMBER_DANK((MIX+Z)Z) DO:

Right before the cycle, there is a declaration of type and assignment of value of variable Z:

VARIABLE Z: INTEGER

Z=13

So this part of code looks like this:

VARIABLE Z: INTEGER
Z=13
WHILE IS_THIS_NUMBER_DANK((MIX+Z)Z) DO:

Remember, you can only change value assigned to only one integer variable to stop the robot. And you have only one try.

Hint:

You need three little insights to solve this puzzle

• To me, it looks like MacGoofy made a perfectly fine programming language this time, given that it has integers, booleans, variables, and while loops. Jan 15, 2021 at 3:32

Taking the [lateral-thinking] tag somewhat seriously, I remark that

the name of the language is Romalog, in which case perhaps MIX is actually 1009.

So

I'll set the value of Z to -1009 instead of 13, which will make that arithmetic expression into 0^-1009, which should be an arithmetic error (it's effectively trying to divide by zero) and hope that that makes the robot stop.

• Flawless victory! Jan 15, 2021 at 3:03
• If this is correct then I think it would have been better if Z had originally been initialised to 1 rather than 13, so that it could also be interpreted in the same way. Jan 15, 2021 at 13:53
• @Vicky rot(13)(Qb lbh zrna, fb V jbhyq unir orra nffvtarq gb M vavgvnyyl? Vg jnf qryvorengr, vg'f n jnpxl ynathntr gung nyybjf jevgvat ahzoref obgu va Ebzna jnl naq Uvaqh-Nenovp jnl.) Jan 15, 2021 at 14:02
• Yes, that is what I mean - "mix"ing (haha) just seems slightly odder than having only one type. Jan 15, 2021 at 16:17
• another spoiler on the first spoiler for dummies, about the connection between those? asking for a friend Jan 17, 2021 at 19:22