6.666 — Arcane Programs Solution

The original file:

"%c%c%c\n", __o_o, o__o_,
#define _o_o_ if
#define o_o_o else
#define oo___ printf
#include <stdio.h>
*2<(o__o_-__o_o))
+ __o_o; o__o_ = o_o__ +
1; o___o = o__o_ + _o__o - 11;
_o__o * 3; o_o__ = _o__o
_o__o = 24; __o_o =
_o_o_ (((o___o-o__o_))
int _o__o, __o_o;
int main (void)
int o_o__, o__o_, o___o;
o___o); return 0;
o___o, __o_o); o_o_o oo___(
oo___("%c%c%c\n", _o__o,
(
)

This is a C program but it doesn't make any sense because the lines have been sorted. Re-ordering the lines gives:

#include <stdio.h>
#define _o_o_ if
#define o_o_o else
#define oo___ printf
int main (void)
(
int _o__o, __o_o;
int o_o__, o__o_, o___o;
_o__o = 24; __o_o =
_o__o * 3; o_o__ = _o__o
+ __o_o; o__o_ = o_o__ +
1; o___o = o__o_ + _o__o - 11;
_o_o_ (((o___o-o__o_))
*2<(o__o_-__o_o)) oo___("%c%c%c\n", _o__o,
o___o, __o_o); o_o_o oo___(
"%c%c%c\n", __o_o, o__o_,
o___o); return 0;
)

Compiling and executing this program gives the output Han. HAN is the final answer.

Here is a version of the program formatted in a standard way:

#include <stdio.h>

#define _o_o_ if
#define o_o_o else
#define oo___ printf

int main (void)
(
int _o__o, __o_o;
int o_o__, o__o_, o___o;

_o__o = 24;
__o_o = _o__o * 3;
o_o__ = _o__o + __o_o;
 o__o_ = o_o__ + 1;
 o___o = o__o_ + _o__o - 11;

_o_o_ ( ((o___o-o__o_))*2<(o__o_-__o_o) ) oo___("%c%c%c\n", _o__o, o___o, __o_o);
o_o_o
 oo___("%c%c%c\n", __o_o, o__o_, o___o);

return 0;
)

If, in addition to the #define statements above, you add these:

#define _o__o a
#define __o_o b
#define o_o__ c
#define o__o_ d
#define o___o e

Then the pre-processed program looks like this:

int main (void)
(
int a, b;
int c, d, e;

a = 24;
b = a * 3;
c = a + b;
 d = c + 1;
 e = d + a - 11;

if ( ((e-d))*2<(d-b) ) printf("%c%c%c\n", a, e, b);
else
 printf("%c%c%c\n", b, d, e);

return 0;
)

In the assignments, a=24, b=72, c = 96, d = 97, e = 110. The comparison is 26<25 so the else block is executed, printing 72, 97, 110 as characters which prints Han.