2024年3月28日木曜日

Human Resource Machine Year36-40

お気に入りのゲームHuman Resource Machine(Android版)の
自力で見つけた解答例を書き残して置くことにします。
今回はYear36からYear40です。

Year 36  辞書順に並べよ
スピード目標  102/109

copyfrom 23
copyto 22
1:
inbox
jump if zero 2
copyto [22]
bump+ 22
jump 1:
2:
copyto [22]
copyfrom 24
copyto 21
3:
inbox
jump if zero 4
copyto [21]
bump+ 21
jump 3
4:
copyto [21]
copyfrom 23
copyto 22
copyfrom 24
copyto 21
5:
copyfrom [21]
jump if zero 10
copyfrom [22]
jump if zero 11
sub [21]
jump if zero 9
jump if negative 7
6:
copyfrom [21]
jump if zero 12
outbox
bump+ 21
jump 6
7:
8:
copyfrom [22]
jump if zero 13
outbox
bump+ 22
jump 8
9:
copyfrom [22]
outbox
bump+ 22
bump+ 21
jump 5
10:
11:
12:
13:

サイズ目標  39/39

copyfrom 23
copyto 22
1:
inbox
jump if zero 2
copyto [22]
bump+ 22
jump 1:
2:
copyto [22]
copyfrom 24
copyto 21
3:
inbox
jump if zero 4
copyto [21]
bump+ 21
jump 3
4:
copyto [21]
copyfrom 23
copyto 22
copyfrom 24
copyto 21
5:
copyfrom [21]
jump if zero 10
copyfrom [22]
jump if zero 11
sub [21]
jump if zero 9
jump if negative 6
copyfrom 21
copyto 22
6:
7:
copyfrom [22]
jump if zero 12
outbox
bump+ 22
jump 7
9:
copyfrom [22]
outbox
bump+ 22
bump+ 21
jump 5
10:
11:
12:

Year 37  次へつなげよ
スピード目標  8/8
サイズ目標  63/63

1:
inbox
2:
copyto 7
copyfrom [7]
outbox
bump+ 7
copyfrom [7]
jump if negative 1
jump 2 

Year 38  数字をバラせ
初手

1:
copyfrom 9
copyto 1
copyto 2
bump- 2
inbox
copyto 0
2:
sub 11
jump if negative 3
copyto 0
bump+ 1
copyfrom 0
jump 2
3:
copyfrom 1
jump if zero 4
outbox
bump+ 2
4:
copyfrom 9
copyto 1
5:
copyfrom 0
sub 10
jump if negative 6
copyto 0
bump+ 1
jump 5
6:
copyfrom 1
jump if zero 7
8:
outbox
9:
copyfrom 0
outbox
jump 1
7:
copyfrom 2
copy if zero 8
jump 9

サイズ目標  28/30

1:
copyfrom 9
copyto 1
copyto 2
inbox
copyto 0
2:
sub 11
jump if negative 3
copyto 0
bump+ 1
copyfrom 0
jump 2
3:
4:
copyfrom 0
sub 10
jump if negative 5
copyto 0
bump+ 2
jump 4
5:
copyfrom 1
jump if zero 6
outbox
copyfrom 2
7:
outbox
8:
copyfrom 0
outbox
jump 1
6:
copyfrom 2
jump if zero 8
jump 7


スピード目標  159/165

copyfrom 11
add 11
copyto 8
add 8
copyto 5
copyfrom 10
add 10
copyto 7
add 7
copyto 4
copyfrom 9
copyto 6
bump+ 6
bump+ 6
add 6
copyto 3
1:
inbox
copyto 0
sub 10
jump if negative 2
copyfrm 9
copyto 1
copyto 2
copyfrom 0
sub 11
jump if negative 3
copyfrom 0
sub 5
jump if negative 4
copyto 0
copyfrom 3
copyto 2
4:
copyfrom 0
sub 5
jump if negative 5
copyto 0
copyfrom 2
add 3
copyto 2
5:
copyfrom 0
sub 8
jump if negative 6
copyto 0
copyfrom 2
add 6
copyto 2
6:
copyfrom 0
sub 11
jump if negative 7
copyto 0
bump+ 2
7:
3:
copyfrom 0
sub 4
jump if negative 8
copyto 0
copyfrom 3
copyto 1
8:
copyfrom 0
sub 4
jump if negative 9
copyto 0
copyfrom 1
add 3
copyto 1
9:
copyfrom 0
sub 7
jump if negative 10
copyto 0
copyfrom 1
add 6
copyto 1
10:
copyfrom 0
sub 10
jump if negative 11
copyto 0
bump+ 1
11:
copyfrom 2
jump if zero 12
outbox
copyfrom 1
13:
outbox
14:
2:
copyfrom 0
outbox
jump 1
12:
copyfrom 1
jump if zero 14
jump 13

Year 39  座標をもとめよ
初手

1:
copyfrom 14
copyto 1
inbox
copyto 0
2:
sub 15
jump if negative 3
copyto 0
bump+ 1
copyfrom 0
jump 2
3:
copyfrom 0
outbox
copyform 1
outbox
jump 1

スピード目標  76/76
サイズ目標  14/14

1:
copyfrom 14
copyto 1
inbox
2:
sub 15
jump if negative 3
copyto 0
bump+ 1
copyfrom 0
jump 2
3:
add 15
outbox
copyform 1
outbox
jump 1

Year 40  素因数に分解せよ
スピード目標  330/399 (サイズ:34/28)
1:
2:
copyfrom 24
copyto 6
copyto 5
bump+ 5
bump+ 5
inbox
copyto 0
3:
4:
5:
sub 5
jump if zero 6
jump if negative 7
copyto 1
bunm+6
copyfrom 1
jump 5
7:
bump+ 5
add 5
sub 0
jump if negative 8
copyfrom 0
outbox
jump 2
8:
copyfrom 24
copyto 6
copyfrom 0
jump 4
6:
copyfrom 5
outbox
copyfrom 6
jump if zero 1
copyto 0
copyfrom 24
copyto 6
bump+ 0
jump 3

サイズ目標  28/28 (スピード:435/399)

1:
2:
copyfrom 24
copyto 5
bump+ 5
bump+ 5
inbox
3:
copyto 0
4:
copyfrom 24
copyto 6
copyfrom 0
5:
sub 5
jump if zero 6
jump if negative 7
copyto 1
bump+ 6
copyfrom 1
jump 5
7:
bump+ 5
sub 0
jump if negative 4
copyfrom 0
outbox
jump 2
6:
copyfrom 5
outbox
copyfrom 6
jump if zero 1
bump+ 6
jump 3

0 件のコメント:

コメントを投稿