CISCN2021 little_evil

国赛题复现

分离出ruby脚本

题目给的是一个 ruby 解释器,由 ruby-packer 打包,binwalk -e 提取出 output.rb

混淆严重,但是大概可以知道前面定义了几个函数,后面那一串是在调用函数。最后那个函数的 send 执行了后面那个参数,可以用 print 打印出来。之后同样还有一层再执行 print 得到最后的程序

开头是$、@的是变量,改一下变量名,可以看出是 vm

print 出跳转的表

解 vm

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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
vmcode='3351635164300000000540000000003164073000000540000003164070070000071730000000541111111131641175160343516445163530440316354031643451634235163516000000054000000000003164344354131645335163435164444516333530444403331635403164344451665163423516351600000054000000000316413443541316453351634351644445163335304444033316354031643444516651634235163516000000005400000000000316403443541316453351634351644445163335304444033316354031643444516651634235163516000000005400000000000031640344354131645335163435164444516333530444403331635403164344451665163423516351600000540000000000031643443541316453351634351644445163335304444033316354031643444516651635164453030441633544033164533516351643000000005400000000003164171111744516644'
index=0
import re
jumptable=[0]*709
pattern = re.compile(r'\d+')
raw="2=>4, 6=>8, 19=>32, 43=>53, 76=>88, 93=>95, 100=>102, 105=>107, 109=>117, 119=>124, 128=>130, 135=>137, 139=>141, 149=>164, 170=>175, 180=>182, 186=>188, 193=>195, 199=>211, 213=>218, 224=>226, 177=>227, 228=>230, 235=>237, 239=>241, 248=>261, 268=>273, 278=>280, 284=>286, 291=>293, 297=>309, 311=>316, 322=>324, 275=>325, 326=>328, 333=>335, 337=>339, 348=>363, 370=>375, 380=>382, 386=>388, 393=>395, 399=>411, 413=>418, 424=>426, 377=>427, 428=>430, 435=>437, 439=>441, 450=>466, 473=>478, 483=>485, 489=>491, 496=>498, 502=>514, 516=>521, 527=>529, 480=>530, 531=>533, 538=>540, 542=>544, 550=>565, 571=>576, 581=>583, 587=>589, 594=>596, 600=>612, 614=>619, 625=>627, 578=>628, 629=>631, 633=>635, 638=>646, 649=>656, 661=>663, 665=>667, 678=>692, 703=>705, 658=>706, 4=>2, 8=>6, 32=>19, 53=>43, 88=>76, 95=>93, 102=>100, 107=>105, 117=>109, 124=>119, 130=>128, 137=>135, 141=>139, 164=>149, 175=>170, 182=>180, 188=>186, 195=>193, 211=>199, 218=>213, 226=>224, 227=>177, 230=>228, 237=>235, 241=>239, 261=>248, 273=>268, 280=>278, 286=>284, 293=>291, 309=>297, 316=>311, 324=>322, 325=>275, 328=>326, 335=>333, 339=>337, 363=>348, 375=>370, 382=>380, 388=>386, 395=>393, 411=>399, 418=>413, 426=>424, 427=>377, 430=>428, 437=>435, 441=>439, 466=>450, 478=>473, 485=>483, 491=>489, 498=>496, 514=>502, 521=>516, 529=>527, 530=>480, 533=>531, 540=>538, 544=>542, 565=>550, 576=>571, 583=>581, 589=>587, 596=>594, 612=>600, 619=>614, 627=>625, 628=>578, 631=>629, 635=>633, 646=>638, 656=>649, 663=>661, 667=>665, 692=>678, 705=>703, 706=>658"
m=pattern.findall(raw)
#print(m)
for i in range(0,len(m)//2):
jumptable[int(m[2*i])] = int(m[2*i+1])
#print(jumptable)
inputindex=0

for index in range(0,709):
print(str(index)+": ",end='')
if vmcode[index]=='0':
print("inputchar+=1 ",end='')
print(inputindex)
elif vmcode[index]=='1':
print("inputchar-=1 ",end='')
print(inputindex)
elif vmcode[index]=='2':
print("input ",end='')
print(inputindex)
elif vmcode[index]=='3':
print("inputchar index +1 ",end='')
inputindex+=1
print(inputindex)
elif vmcode[index]=='4':
print("inputchar index -1 ",end='')
inputindex-=1
print(inputindex)
elif vmcode[index]=='5':
print("if inputchar == 0 jump "+ str(jumptable[index]+1)+' ',end='')
print(inputindex)
elif vmcode[index]=='6':
print("if inputchar != 0 jump "+ str(jumptable[index]+1)+' ',end='')
print(inputindex)

'''
0: inputchar index +1 1
1: inputchar index +1 2
2: if inputchar == 0 jump 5 2
3: inputchar-=1 2
4: if inputchar != 0 jump 3 2
5: inputchar index +1 3
6: if inputchar == 0 jump 9 3
7: inputchar-=1 3
8: if inputchar != 0 jump 7 3
9: inputchar index -1 2
10: inputchar index +1 3
11: inputchar+=1 3
12: inputchar+=1 3
13: inputchar+=1 3
14: inputchar+=1 3
15: inputchar+=1 3
16: inputchar+=1 3
17: inputchar+=1 3
18: inputchar+=1 3
19: if inputchar == 0 jump 33 3
20: inputchar index -1 2
21: inputchar+=1 2
22: inputchar+=1 2
23: inputchar+=1 2
24: inputchar+=1 2
25: inputchar+=1 2
26: inputchar+=1 2
27: inputchar+=1 2
28: inputchar+=1 2
29: inputchar+=1 2
30: inputchar index +1 3
31: inputchar-=1 3
32: if inputchar != 0 jump 20 3
33: inputchar index -1 2
34: inputchar+=1 2
35: 36: inputchar index +1 3
37: inputchar+=1 3
38: inputchar+=1 3
39: inputchar+=1 3
40: inputchar+=1 3
41: inputchar+=1 3
42: inputchar+=1 3
43: if inputchar == 0 jump 54 3
44: inputchar index -1 2
45: inputchar+=1 2
46: inputchar+=1 2
47: inputchar+=1 2
48: inputchar+=1 2
49: inputchar+=1 2
50: inputchar+=1 2
51: inputchar index +1 3
52: inputchar-=1 3
53: if inputchar != 0 jump 44 3
54: inputchar index -1 2
55: inputchar+=1 2
56: 57: inputchar+=1 2
58: inputchar+=1 2
59: 60: inputchar+=1 2
61: inputchar+=1 2
62: inputchar+=1 2
63: inputchar+=1 2
64: inputchar+=1 2
65: 66: inputchar-=1 2
67: 68: inputchar index +1 3
69: inputchar+=1 3
70: inputchar+=1 3
71: inputchar+=1 3
72: inputchar+=1 3
73: inputchar+=1 3
74: inputchar+=1 3
75: inputchar+=1 3
76: if inputchar == 0 jump 89 3
77: inputchar index -1 2
78: inputchar-=1 2
79: inputchar-=1 2
80: inputchar-=1 2
81: inputchar-=1 2
82: inputchar-=1 2
83: inputchar-=1 2
84: inputchar-=1 2
85: inputchar-=1 2
86: inputchar index +1 3
87: inputchar-=1 3
88: if inputchar != 0 jump 77 3
89: inputchar index -1 2
90: inputchar-=1 2
91: inputchar-=1 2
92: 93: if inputchar == 0 jump 96 2
94: inputchar-=1 2
95: if inputchar != 0 jump 94 2
96: inputchar+=1 2
97: inputchar index +1 3
98: inputchar index -1 2
99: inputchar index +1 3
100: if inputchar == 0 jump 103 3
101: inputchar-=1 3
102: if inputchar != 0 jump 101 3
103: inputchar index -1 2
104: inputchar index -1 1
105: if inputchar == 0 jump 108 1
106: inputchar-=1 1
107: if inputchar != 0 jump 106 1
108: inputchar index +1 2
109: if inputchar == 0 jump 118 2
110: inputchar index +1 3
111: inputchar+=1 3
112: inputchar index -1 2
113: inputchar index -1 1
114: inputchar+=1 1
115: inputchar index +1 2
116: inputchar-=1 2
117: if inputchar != 0 jump 110 2
118: inputchar index +1 3
119: if inputchar == 0 jump 125 3
120: inputchar index -1 2
121: inputchar+=1 2
122: inputchar index +1 3
123: inputchar-=1 3
124: if inputchar != 0 jump 120 3
125: inputchar index -1 2
126: inputchar index +1 3
127: inputchar index -1 2
128: if inputchar == 0 jump 131 2
129: inputchar-=1 2
130: if inputchar != 0 jump 129 2
131: inputchar index +1 3
132: inputchar index -1 2
133: input 2
134: inputchar index +1 3
135: if inputchar == 0 jump 138 3
136: inputchar-=1 3
137: if inputchar != 0 jump 136 3
138: inputchar index +1 4
139: if inputchar == 0 jump 142 4
140: inputchar-=1 4
141: if inputchar != 0 jump 140 4
142: inputchar+=1 4
143: inputchar+=1 4
144: inputchar+=1 4
145: inputchar+=1 4
146: inputchar+=1 4
147: inputchar+=1 4
148: inputchar+=1 4
149: if inputchar == 0 jump 165 4
150: inputchar index -1 3
151: inputchar+=1 3
152: inputchar+=1 3
153: inputchar+=1 3
154: inputchar+=1 3
155: inputchar+=1 3
156: inputchar+=1 3
157: inputchar+=1 3
158: inputchar+=1 3
159: inputchar+=1 3
160: inputchar+=1 3
161: inputchar+=1 3
162: inputchar index +1 4
163: inputchar-=1 4
164: if inputchar != 0 jump 150 4
165: inputchar index -1 3
166: inputchar index +1 4
167: inputchar index -1 3
168: inputchar index -1 2
169: inputchar index +1 3
170: if inputchar == 0 jump 176 3
171: inputchar index -1 2
172: inputchar-=1 2
173: inputchar index +1 3
174: inputchar-=1 3
175: if inputchar != 0 jump 171 3
176: inputchar index -1 2
177: if inputchar == 0 jump 228 2
178: inputchar index +1 3
179: inputchar index +1 4
180: if inputchar == 0 jump 183 4
181: inputchar-=1 4
182: if inputchar != 0 jump 181 4
183: inputchar index +1 5
184: inputchar index -1 4
185: inputchar index +1 5
186: if inputchar == 0 jump 189 5
187: inputchar-=1 5
188: if inputchar != 0 jump 187 5
189: inputchar index -1 4
190: inputchar index -1 3
191: inputchar index -1 2
192: inputchar index -1 1
193: if inputchar == 0 jump 196 1
194: inputchar-=1 1
195: if inputchar != 0 jump 194 1
196: inputchar index +1 2
197: inputchar index +1 3
198: inputchar index +1 4
199: if inputchar == 0 jump 212 4
200: inputchar index +1 5
201: inputchar+=1 5
202: inputchar index -1 4
203: inputchar index -1 3
204: inputchar index -1 2
205: inputchar index -1 1
206: inputchar+=1 1
207: inputchar index +1 2
208: inputchar index +1 3
209: inputchar index +1 4
210: inputchar-=1 4
211: if inputchar != 0 jump 200 4
212: inputchar index +1 5
213: if inputchar == 0 jump 219 5
214: inputchar index -1 4
215: inputchar+=1 4
216: inputchar index +1 5
217: inputchar-=1 5
218: if inputchar != 0 jump 214 5
219: inputchar index -1 4
220: inputchar index +1 5
221: inputchar index -1 4
222: inputchar index -1 3
223: inputchar index -1 2
224: if inputchar == 0 jump 227 2
225: inputchar-=1 2
226: if inputchar != 0 jump 225 2
227: if inputchar != 0 jump 178 2
228: if inputchar == 0 jump 231 2
229: inputchar-=1 2
230: if inputchar != 0 jump 229 2
231: inputchar index +1 3
232: inputchar index -1 2
233: input 2
234: inputchar index +1 3
235: if inputchar == 0 jump 238 3
236: inputchar-=1 3
237: if inputchar != 0 jump 236 3
238: inputchar index +1 4
239: if inputchar == 0 jump 242 4
240: inputchar-=1 4
241: if inputchar != 0 jump 240 4
242: inputchar+=1 4
243: inputchar+=1 4
244: inputchar+=1 4
245: inputchar+=1 4
246: inputchar+=1 4
247: inputchar+=1 4
248: if inputchar == 0 jump 262 4
249: inputchar index -1 3
250: inputchar+=1 3
251: inputchar+=1 3
252: inputchar+=1 3
253: inputchar+=1 3
254: inputchar+=1 3
255: inputchar+=1 3
256: inputchar+=1 3
257: inputchar+=1 3
258: inputchar+=1 3
259: inputchar index +1 4
260: inputchar-=1 4
261: if inputchar != 0 jump 249 4
262: inputchar index -1 3
263: inputchar-=1 3
264: inputchar index +1 4
265: inputchar index -1 3
266: inputchar index -1 2
267: inputchar index +1 3
268: if inputchar == 0 jump 274 3
269: inputchar index -1 2
270: inputchar-=1 2
271: inputchar index +1 3
272: inputchar-=1 3
273: if inputchar != 0 jump 269 3
274: inputchar index -1 2
275: if inputchar == 0 jump 326 2
276: inputchar index +1 3
277: inputchar index +1 4
278: if inputchar == 0 jump 281 4
279: inputchar-=1 4
280: if inputchar != 0 jump 279 4
281: inputchar index +1 5
282: inputchar index -1 4
283: inputchar index +1 5
284: if inputchar == 0 jump 287 5
285: inputchar-=1 5
286: if inputchar != 0 jump 285 5
287: inputchar index -1 4
288: inputchar index -1 3
289: inputchar index -1 2
290: inputchar index -1 1
291: if inputchar == 0 jump 294 1
292: inputchar-=1 1
293: if inputchar != 0 jump 292 1
294: inputchar index +1 2
295: inputchar index +1 3
296: inputchar index +1 4
297: if inputchar == 0 jump 310 4
298: inputchar index +1 5
299: inputchar+=1 5
300: inputchar index -1 4
301: inputchar index -1 3
302: inputchar index -1 2
303: inputchar index -1 1
304: inputchar+=1 1
305: inputchar index +1 2
306: inputchar index +1 3
307: inputchar index +1 4
308: inputchar-=1 4
309: if inputchar != 0 jump 298 4
310: inputchar index +1 5
311: if inputchar == 0 jump 317 5
312: inputchar index -1 4
313: inputchar+=1 4
314: inputchar index +1 5
315: inputchar-=1 5
316: if inputchar != 0 jump 312 5
317: inputchar index -1 4
318: inputchar index +1 5
319: inputchar index -1 4
320: inputchar index -1 3
321: inputchar index -1 2
322: if inputchar == 0 jump 325 2
323: inputchar-=1 2
324: if inputchar != 0 jump 323 2
325: if inputchar != 0 jump 276 2
326: if inputchar == 0 jump 329 2
327: inputchar-=1 2
328: if inputchar != 0 jump 327 2
329: inputchar index +1 3
330: inputchar index -1 2
331: input 2
332: inputchar index +1 3
333: if inputchar == 0 jump 336 3
334: inputchar-=1 3
335: if inputchar != 0 jump 334 3
336: inputchar index +1 4
337: if inputchar == 0 jump 340 4
338: inputchar-=1 4
339: if inputchar != 0 jump 338 4
340: inputchar+=1 4
341: inputchar+=1 4
342: inputchar+=1 4
343: inputchar+=1 4
344: inputchar+=1 4
345: inputchar+=1 4
346: inputchar+=1 4
347: inputchar+=1 4
348: if inputchar == 0 jump 364 4
349: inputchar index -1 3
350: inputchar+=1 3
351: inputchar+=1 3
352: inputchar+=1 3
353: inputchar+=1 3
354: inputchar+=1 3
355: inputchar+=1 3
356: inputchar+=1 3
357: inputchar+=1 3
358: inputchar+=1 3
359: inputchar+=1 3
360: inputchar+=1 3
361: inputchar index +1 4
362: inputchar-=1 4
363: if inputchar != 0 jump 349 4
364: inputchar index -1 3
365: inputchar+=1 3
366: inputchar index +1 4
367: inputchar index -1 3
368: inputchar index -1 2
369: inputchar index +1 3
370: if inputchar == 0 jump 376 3
371: inputchar index -1 2
372: inputchar-=1 2
373: inputchar index +1 3
374: inputchar-=1 3
375: if inputchar != 0 jump 371 3
376: inputchar index -1 2
377: if inputchar == 0 jump 428 2
378: inputchar index +1 3
379: inputchar index +1 4
380: if inputchar == 0 jump 383 4
381: inputchar-=1 4
382: if inputchar != 0 jump 381 4
383: inputchar index +1 5
384: inputchar index -1 4
385: inputchar index +1 5
386: if inputchar == 0 jump 389 5
387: inputchar-=1 5
388: if inputchar != 0 jump 387 5
389: inputchar index -1 4
390: inputchar index -1 3
391: inputchar index -1 2
392: inputchar index -1 1
393: if inputchar == 0 jump 396 1
394: inputchar-=1 1
395: if inputchar != 0 jump 394 1
396: inputchar index +1 2
397: inputchar index +1 3
398: inputchar index +1 4
399: if inputchar == 0 jump 412 4
400: inputchar index +1 5
401: inputchar+=1 5
402: inputchar index -1 4
403: inputchar index -1 3
404: inputchar index -1 2
405: inputchar index -1 1
406: inputchar+=1 1
407: inputchar index +1 2
408: inputchar index +1 3
409: inputchar index +1 4
410: inputchar-=1 4
411: if inputchar != 0 jump 400 4
412: inputchar index +1 5
413: if inputchar == 0 jump 419 5
414: inputchar index -1 4
415: inputchar+=1 4
416: inputchar index +1 5
417: inputchar-=1 5
418: if inputchar != 0 jump 414 5
419: inputchar index -1 4
420: inputchar index +1 5
421: inputchar index -1 4
422: inputchar index -1 3
423: inputchar index -1 2
424: if inputchar == 0 jump 427 2
425: inputchar-=1 2
426: if inputchar != 0 jump 425 2
427: if inputchar != 0 jump 378 2
428: if inputchar == 0 jump 431 2
429: inputchar-=1 2
430: if inputchar != 0 jump 429 2
431: inputchar index +1 3
432: inputchar index -1 2
433: input 2
434: inputchar index +1 3
435: if inputchar == 0 jump 438 3
436: inputchar-=1 3
437: if inputchar != 0 jump 436 3
438: inputchar index +1 4
439: if inputchar == 0 jump 442 4
440: inputchar-=1 4
441: if inputchar != 0 jump 440 4
442: inputchar+=1 4
443: inputchar+=1 4
444: inputchar+=1 4
445: inputchar+=1 4
446: inputchar+=1 4
447: inputchar+=1 4
448: inputchar+=1 4
449: inputchar+=1 4
450: if inputchar == 0 jump 467 4
451: inputchar index -1 3
452: inputchar+=1 3
453: inputchar+=1 3
454: inputchar+=1 3
455: inputchar+=1 3
456: inputchar+=1 3
457: inputchar+=1 3
458: inputchar+=1 3
459: inputchar+=1 3
460: inputchar+=1 3
461: inputchar+=1 3
462: inputchar+=1 3
463: inputchar+=1 3
464: inputchar index +1 4
465: inputchar-=1 4
466: if inputchar != 0 jump 451 4
467: inputchar index -1 3
468: inputchar+=1 3
469: inputchar index +1 4
470: inputchar index -1 3
471: inputchar index -1 2
472: inputchar index +1 3
473: if inputchar == 0 jump 479 3
474: inputchar index -1 2
475: inputchar-=1 2
476: inputchar index +1 3
477: inputchar-=1 3
478: if inputchar != 0 jump 474 3
479: inputchar index -1 2
480: if inputchar == 0 jump 531 2
481: inputchar index +1 3
482: inputchar index +1 4
483: if inputchar == 0 jump 486 4
484: inputchar-=1 4
485: if inputchar != 0 jump 484 4
486: inputchar index +1 5
487: inputchar index -1 4
488: inputchar index +1 5
489: if inputchar == 0 jump 492 5
490: inputchar-=1 5
491: if inputchar != 0 jump 490 5
492: inputchar index -1 4
493: inputchar index -1 3
494: inputchar index -1 2
495: inputchar index -1 1
496: if inputchar == 0 jump 499 1
497: inputchar-=1 1
498: if inputchar != 0 jump 497 1
499: inputchar index +1 2
500: inputchar index +1 3
501: inputchar index +1 4
502: if inputchar == 0 jump 515 4
503: inputchar index +1 5
504: inputchar+=1 5
505: inputchar index -1 4
506: inputchar index -1 3
507: inputchar index -1 2
508: inputchar index -1 1
509: inputchar+=1 1
510: inputchar index +1 2
511: inputchar index +1 3
512: inputchar index +1 4
513: inputchar-=1 4
514: if inputchar != 0 jump 503 4
515: inputchar index +1 5
516: if inputchar == 0 jump 522 5
517: inputchar index -1 4
518: inputchar+=1 4
519: inputchar index +1 5
520: inputchar-=1 5
521: if inputchar != 0 jump 517 5
522: inputchar index -1 4
523: inputchar index +1 5
524: inputchar index -1 4
525: inputchar index -1 3
526: inputchar index -1 2
527: if inputchar == 0 jump 530 2
528: inputchar-=1 2
529: if inputchar != 0 jump 528 2
530: if inputchar != 0 jump 481 2
531: if inputchar == 0 jump 534 2
532: inputchar-=1 2
533: if inputchar != 0 jump 532 2
534: inputchar index +1 3
535: inputchar index -1 2
536: input 2
537: inputchar index +1 3
538: if inputchar == 0 jump 541 3
539: inputchar-=1 3
540: if inputchar != 0 jump 539 3
541: inputchar index +1 4
542: if inputchar == 0 jump 545 4
543: inputchar-=1 4
544: if inputchar != 0 jump 543 4
545: inputchar+=1 4
546: inputchar+=1 4
547: inputchar+=1 4
548: inputchar+=1 4
549: inputchar+=1 4
550: if inputchar == 0 jump 566 4
551: inputchar index -1 3
552: inputchar+=1 3
553: inputchar+=1 3
554: inputchar+=1 3
555: inputchar+=1 3
556: inputchar+=1 3
557: inputchar+=1 3
558: inputchar+=1 3
559: inputchar+=1 3
560: inputchar+=1 3
561: inputchar+=1 3
562: inputchar+=1 3
563: inputchar index +1 4
564: inputchar-=1 4
565: if inputchar != 0 jump 551 4
566: inputchar index -1 3
567: inputchar index +1 4
568: inputchar index -1 3
569: inputchar index -1 2
570: inputchar index +1 3
571: if inputchar == 0 jump 577 3
572: inputchar index -1 2
573: inputchar-=1 2
574: inputchar index +1 3
575: inputchar-=1 3
576: if inputchar != 0 jump 572 3
577: inputchar index -1 2
578: if inputchar == 0 jump 629 2
579: inputchar index +1 3
580: inputchar index +1 4
581: if inputchar == 0 jump 584 4
582: inputchar-=1 4
583: if inputchar != 0 jump 582 4
584: inputchar index +1 5
585: inputchar index -1 4
586: inputchar index +1 5
587: if inputchar == 0 jump 590 5
588: inputchar-=1 5
589: if inputchar != 0 jump 588 5
590: inputchar index -1 4
591: inputchar index -1 3
592: inputchar index -1 2
593: inputchar index -1 1
594: if inputchar == 0 jump 597 1
595: inputchar-=1 1
596: if inputchar != 0 jump 595 1
597: inputchar index +1 2
598: inputchar index +1 3
599: inputchar index +1 4
600: if inputchar == 0 jump 613 4
601: inputchar index +1 5
602: inputchar+=1 5
603: inputchar index -1 4
604: inputchar index -1 3
605: inputchar index -1 2
606: inputchar index -1 1
607: inputchar+=1 1
608: inputchar index +1 2
609: inputchar index +1 3
610: inputchar index +1 4
611: inputchar-=1 4
612: if inputchar != 0 jump 601 4
613: inputchar index +1 5
614: if inputchar == 0 jump 620 5
615: inputchar index -1 4
616: inputchar+=1 4
617: inputchar index +1 5
618: inputchar-=1 5
619: if inputchar != 0 jump 615 5
620: inputchar index -1 4
621: inputchar index +1 5
622: inputchar index -1 4
623: inputchar index -1 3
624: inputchar index -1 2
625: if inputchar == 0 jump 628 2
626: inputchar-=1 2
627: if inputchar != 0 jump 626 2
628: if inputchar != 0 jump 579 2
629: if inputchar == 0 jump 632 2
630: inputchar-=1 2
631: if inputchar != 0 jump 630 2
632: inputchar index +1 3
633: if inputchar == 0 jump 636 3
634: inputchar-=1 3
635: if inputchar != 0 jump 634 3
636: inputchar index -1 2
637: inputchar index -1 1
638: if inputchar == 0 jump 647 1
639: inputchar index +1 2
640: inputchar+=1 2
641: inputchar index +1 3
642: inputchar+=1 3
643: inputchar index -1 2
644: inputchar index -1 1
645: inputchar-=1 1
646: if inputchar != 0 jump 639 1
647: inputchar index +1 2
648: inputchar index +1 3
649: if inputchar == 0 jump 657 3
650: inputchar index -1 2
651: inputchar index -1 1
652: inputchar+=1 1
653: inputchar index +1 2
654: inputchar index +1 3
655: inputchar-=1 3
656: if inputchar != 0 jump 650 3
657: inputchar index -1 2
658: if inputchar == 0 jump 707 2
659: inputchar index +1 3
660: inputchar index +1 4
661: if inputchar == 0 jump 664 4
662: inputchar-=1 4
663: if inputchar != 0 jump 662 4
664: inputchar index +1 5
665: if inputchar == 0 jump 668 5
666: inputchar-=1 5
667: if inputchar != 0 jump 666 5
668: inputchar index -1 4
669: inputchar index +1 5
670: inputchar+=1 5
671: inputchar+=1 5
672: inputchar+=1 5
673: inputchar+=1 5
674: inputchar+=1 5
675: inputchar+=1 5
676: inputchar+=1 5
677: inputchar+=1 5
678: if inputchar == 0 jump 693 5
679: inputchar index -1 4
680: inputchar+=1 4
681: inputchar+=1 4
682: inputchar+=1 4
683: inputchar+=1 4
684: inputchar+=1 4
685: inputchar+=1 4
686: inputchar+=1 4
687: inputchar+=1 4
688: inputchar+=1 4
689: inputchar+=1 4
690: inputchar index +1 5
691: inputchar-=1 5
692: if inputchar != 0 jump 679 5
693: inputchar index -1 4
694: inputchar-=1 4
695: 696: inputchar-=1 4
697: inputchar-=1 4
698: inputchar-=1 4
699: inputchar-=1 4
700: 701: inputchar index -1 3
702: inputchar index -1 2
703: if inputchar == 0 jump 706 2
704: inputchar-=1 2
705: if inputchar != 0 jump 704 2
706: if inputchar != 0 jump 659 2
707: inputchar index -1 1
708: inputchar index -1 0
'''

每次输入放入 2 位置,与 3、4位置的计算结果比较

作者

0wl

发布于

2021-07-19

更新于

2021-07-19

许可协议

评论