Hourglass puzzle: Difference between revisions
Content added Content deleted
m (→{{header|Raku}}: don't worry, please consult the Julia entry) |
|||
Line 395: | Line 395: | ||
At time t = 14 , flip hourglass 7 |
At time t = 14 , flip hourglass 7 |
||
At time t = 16 , flip hourglass 4 end = 9</pre> |
At time t = 16 , flip hourglass 4 end = 9</pre> |
||
If interim-flips are allowed I think the following is shorter, just that I wish I knew how to implement it .. |
|||
<lang perl6>t x(4) y(7) |
|||
0 |
|||
4 flip record = 0 |
|||
7 flip flip record +=3 |
|||
10 stop flip record +=3 |
|||
13 stop record +=3</lang> |
|||
=={{header|REXX}}== |
=={{header|REXX}}== |