-
Notifications
You must be signed in to change notification settings - Fork 17
/
input.js
38 lines (37 loc) · 1.1 KB
/
input.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const PROGRAM = [
{ op: 'set', args: ['b', 67] },
{ op: 'set', args: ['c', 'b'] },
{ op: 'jnz', args: ['a', 2] },
{ op: 'jnz', args: [1, 5] },
{ op: 'mul', args: ['b', 100] },
{ op: 'sub', args: ['b', -100000] },
{ op: 'set', args: ['c', 'b'] },
{ op: 'sub', args: ['c', -17000] },
{ op: 'set', args: ['f', 1] },
{ op: 'set', args: ['d', 2] },
{ op: 'set', args: ['e', 2] },
{ op: 'set', args: ['g', 'd'] },
{ op: 'mul', args: ['g', 'e'] },
{ op: 'sub', args: ['g', 'b'] },
{ op: 'jnz', args: ['g', 2] },
{ op: 'set', args: ['f', 0] },
{ op: 'sub', args: ['e', -1] },
{ op: 'set', args: ['g', 'e'] },
{ op: 'sub', args: ['g', 'b'] },
{ op: 'jnz', args: ['g', -8] },
{ op: 'sub', args: ['d', -1] },
{ op: 'set', args: ['g', 'd'] },
{ op: 'sub', args: ['g', 'b'] },
{ op: 'jnz', args: ['g', -13] },
{ op: 'jnz', args: ['f', 2] },
{ op: 'sub', args: ['h', -1] },
{ op: 'set', args: ['g', 'b'] },
{ op: 'sub', args: ['g', 'c'] },
{ op: 'jnz', args: ['g', 2] },
{ op: 'jnz', args: [1, 3] },
{ op: 'sub', args: ['b', -17] },
{ op: 'jnz', args: [1, -23] },
];
module.exports = {
input: PROGRAM,
};