capitalex a révisé ce gist 1 month ago. Aller à la révision
1 file changed, 37 insertions
tak.nv(fichier créé)
| @@ -0,0 +1,37 @@ | |||
| 1 | + | || | |
| 2 | + | :: tak 7 4 8 | |
| 3 | + | :: print return | |
| 4 | + | ||
| 5 | + | |:: tak $x $y $z | | |
| 6 | + | :: check if $y less than $x | |
| 7 | + | :: if Yes then recurse tak $x $y $z | |
| 8 | + | :: if Nah then return $z | |
| 9 | + | ||
| 10 | + | |:: check if $x $want than $y :@math: $want| :vote: Yes | |
| 11 | + | |:: check if $x $want than $y :@math: $got| :vote: Nah | |
| 12 | + | |:: check if $x $want than $y?| | |
| 13 | + | :@math: compare $x $y | |
| 14 | + | ||
| 15 | + | |:: if Yes then recurse tak $x $y $z :: if Nah then return $_ :vote: Yes| | |
| 16 | + | :: next tak $x $y $z | |
| 17 | + | :: next tak $y $z $x | |
| 18 | + | :: next tak $z $x $y | |
| 19 | + | :: next tak | |
| 20 | + | ||
| 21 | + | |:: if Yes then recurse tak $x $y $_ :: if Nah then return $z :vote: Nah| | |
| 22 | + | :return: $z | |
| 23 | + | ||
| 24 | + | |:: next tak $_ $y $z :@math: $x| | |
| 25 | + | :: tak $x $y $z | |
| 26 | + | |:: next tak $x $y $z?| | |
| 27 | + | :@math: subtract $x 1 | |
| 28 | + | ||
| 29 | + | |:: next tak :return: ($z $y $x)| | |
| 30 | + | :: tak $x $y $z | |
| 31 | + | ||
| 32 | + | |:: waiting tak _ $y $z :@math: $x| | |
| 33 | + | :: tak $x $y $z | |
| 34 | + | ||
| 35 | + | |:: print return :return: $x| | |
| 36 | + | :: print (formatted) | |
| 37 | + | :message: "{%d}\n" :arguments: $x :arguments: | |
Plus récent
Plus ancien