106 lines
1.8 KiB
Plaintext
106 lines
1.8 KiB
Plaintext
|
const inputMonkeys = [
|
||
|
[
|
||
|
[91, 58, 52, 69, 95, 54],
|
||
|
['*' 13],
|
||
|
[7, 1, 5],
|
||
|
0
|
||
|
],
|
||
|
[
|
||
|
[80, 80, 97, 84],
|
||
|
['*' 'self'],
|
||
|
[3, 3, 5],
|
||
|
0
|
||
|
],
|
||
|
[
|
||
|
[86, 92, 71],
|
||
|
['+' 7],
|
||
|
[2, 0, 4],
|
||
|
0
|
||
|
],
|
||
|
[
|
||
|
[96, 90, 99, 76, 79, 85, 98, 61],
|
||
|
['+' 4],
|
||
|
[11, 7, 6],
|
||
|
0
|
||
|
],
|
||
|
[
|
||
|
[60, 83, 68, 64, 73],
|
||
|
['*' 19],
|
||
|
[17, 1, 0],
|
||
|
0
|
||
|
],
|
||
|
[
|
||
|
[96, 52, 52, 94, 76, 51, 57],
|
||
|
['+' 3],
|
||
|
[5, 7, 3],
|
||
|
0
|
||
|
],
|
||
|
[
|
||
|
[75],
|
||
|
['+' 5],
|
||
|
[13, 4, 2],
|
||
|
0
|
||
|
],
|
||
|
[
|
||
|
[83, 75],
|
||
|
['+' 1],
|
||
|
[19, 2, 6],
|
||
|
0
|
||
|
]
|
||
|
]
|
||
|
|
||
|
Monkey 0:
|
||
|
Starting items: 91, 58, 52, 69, 95, 54
|
||
|
Operation: new = old * 13
|
||
|
Test: divisible by 7
|
||
|
If true: throw to monkey 1
|
||
|
If false: throw to monkey 5
|
||
|
|
||
|
Monkey 1:
|
||
|
Starting items: 80, 80, 97, 84
|
||
|
Operation: new = old * old
|
||
|
Test: divisible by 3
|
||
|
If true: throw to monkey 3
|
||
|
If false: throw to monkey 5
|
||
|
|
||
|
Monkey 2:
|
||
|
Starting items: 86, 92, 71
|
||
|
Operation: new = old + 7
|
||
|
Test: divisible by 2
|
||
|
If true: throw to monkey 0
|
||
|
If false: throw to monkey 4
|
||
|
|
||
|
Monkey 3:
|
||
|
Starting items: 96, 90, 99, 76, 79, 85, 98, 61
|
||
|
Operation: new = old + 4
|
||
|
Test: divisible by 11
|
||
|
If true: throw to monkey 7
|
||
|
If false: throw to monkey 6
|
||
|
|
||
|
Monkey 4:
|
||
|
Starting items: 60, 83, 68, 64, 73
|
||
|
Operation: new = old * 19
|
||
|
Test: divisible by 17
|
||
|
If true: throw to monkey 1
|
||
|
If false: throw to monkey 0
|
||
|
|
||
|
Monkey 5:
|
||
|
Starting items: 96, 52, 52, 94, 76, 51, 57
|
||
|
Operation: new = old + 3
|
||
|
Test: divisible by 5
|
||
|
If true: throw to monkey 7
|
||
|
If false: throw to monkey 3
|
||
|
|
||
|
Monkey 6:
|
||
|
Starting items: 75
|
||
|
Operation: new = old + 5
|
||
|
Test: divisible by 13
|
||
|
If true: throw to monkey 4
|
||
|
If false: throw to monkey 2
|
||
|
|
||
|
Monkey 7:
|
||
|
Starting items: 83, 75
|
||
|
Operation: new = old + 1
|
||
|
Test: divisible by 19
|
||
|
If true: throw to monkey 2
|
||
|
If false: throw to monkey 6
|