-
Notifications
You must be signed in to change notification settings - Fork 0
/
Year 43 - Multiplication Table
183 lines (182 loc) · 2.36 KB
/
Year 43 - Multiplication Table
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
-- 7 Billion Humans (2145) --
-- 43: Multiplication Table by @commonnickname --
mem1 = nearest wall
mem3 = nearest worker
if n == datacube:
pickup n
if mem3 == 0:
step n
mem2 = nearest wall
if mem1 == mem2:
write 63
mem1 = set 56
mem2 = set 49
mem3 = set 42
mem4 = set 35
else:
write 72
mem1 = set 64
mem2 = set 56
mem3 = set 48
mem4 = set 40
endif
else:
mem4 = nearest worker
if mem3 == mem4:
step n
write 45
mem1 = set 40
mem2 = set 35
mem3 = set 30
mem4 = set 25
else:
step n
write 18
mem1 = set 16
mem2 = set 14
mem3 = set 12
mem4 = set 10
endif
endif
else:
step n
mem2 = nearest wall
if mem3 == 0:
if mem1 == mem2:
pickup n
step n
mem2 = nearest wall
if mem1 == mem2:
write 54
mem1 = set 48
mem2 = set 42
mem3 = set 36
mem4 = set 30
else:
write 9
mem1 = set 8
mem2 = set 7
mem3 = set 6
mem4 = set 5
endif
else:
pickup n
step n
write 81
mem1 = set 72
mem2 = set 63
mem3 = set 54
mem4 = set 45
endif
else:
mem4 = nearest worker
step n
if mem3 == mem4:
pickup c
write 36
mem1 = set 32
mem2 = set 28
mem3 = set 24
mem4 = set 20
else:
pickup c
write 27
mem1 = set 24
mem2 = set 21
mem3 = set 18
mem4 = set 15
endif
endif
endif
drop
pickup n
step n
write mem1
drop
pickup n
step n
write mem2
drop
pickup n
step n
write mem3
drop
pickup n
step n
write mem4
drop
pickup n
step n
if mem1 <= 40:
if mem1 <= 16:
if mem1 == 8:
write 4
mem1 = set 3
mem2 = set 2
mem3 = set 1
else:
write 8
mem1 = set 6
mem2 = set 4
mem3 = set 2
endif
else:
if mem1 == 24:
write 12
mem1 = set 9
mem2 = set 6
mem3 = set 3
else:
if mem1 == 32:
write 16
mem1 = set 12
mem2 = set 8
mem3 = set 4
else:
write 20
mem1 = set 15
mem2 = set 10
mem3 = set 5
endif
endif
endif
else:
if mem1 <= 56:
if mem1 == 48:
write 24
mem1 = set 18
mem2 = set 12
mem3 = set 6
else:
write 28
mem1 = set 21
mem2 = set 14
mem3 = set 7
endif
else:
if mem1 == 64:
write 32
mem1 = set 24
mem2 = set 16
mem3 = set 8
else:
write 36
mem1 = set 27
mem2 = set 18
mem3 = set 9
endif
endif
endif
drop
pickup n
step n
write mem1
drop
pickup n
step n
write mem2
drop
pickup n
step n
write mem3
drop