adventofcode/23/2b.pl

34 lines
401 B
Perl
Raw Normal View History

2017-12-23 20:09:19 +00:00
$a = 1;
$b = 79;
$c = $b;
goto L5 if $a;
goto L9 if 1;
2017-12-23 20:11:01 +00:00
L5: $b *= 100;
2017-12-23 20:09:19 +00:00
$b -= -100000;
$c = $b;
$c -= -17000;
2017-12-23 20:11:01 +00:00
L9: $f = 1;
2017-12-23 20:09:19 +00:00
$d = 2;
2017-12-23 20:11:01 +00:00
L11: $e = 2;
L12: $g = $d;
2017-12-23 20:09:19 +00:00
$g *= $e;
$g -= $b;
goto L17 if $g;
$f = 0;
2017-12-23 20:11:01 +00:00
L17: $e -= -1;
2017-12-23 20:09:19 +00:00
$g = $e;
$g -= $b;
goto L12 if $g;
$d -= -1;
$g = $d;
$g -= $b;
goto L11 if $g;
goto L27 if $f;
$h -= -1;
2017-12-23 20:11:01 +00:00
L27: $g = $b;
2017-12-23 20:09:19 +00:00
$g -= $c;
goto L31 if $g;
2017-12-23 20:11:01 +00:00
goto if 1;
L31: $b -= -17;
2017-12-23 20:09:19 +00:00
goto L9 if 1;