Switching to top instead of bottom for the defined variables

This commit is contained in:
elvis
2024-12-16 16:40:59 +01:00
parent 25f9f12525
commit 1f0d48263a
2 changed files with 46 additions and 16 deletions

View File

@ -5,13 +5,12 @@ let colorred s =
let () =
let program = "
def main with input n output result as
result := 0;
s := 0;
while (0 == ((n - 1) / (2 ^ s)) % 2) do (
s := s + 1
def main with input n output out as
for (x := 2, x < 0, x := 2) do (
y := x + 3;
x := y;
);
out := 1 - y;
"
in