Hop-Hop Game
A ten-minute code-golf sprint built around the classic "hop" kata. For a
number: if it divides by 3, say hop; if it contains the digit 3, say hop;
if both are true, say hop-hop; otherwise just answer the number. Give it a
list and it replies for each one in order.
Making it correct is only the warm-up — the real game is shrinking your solution as small as it will go. Every round tightens the budget, and the player who golfs furthest before time runs out takes it, in any language.
1
Public
Code Golf
hop-hop
10 min
~12 per session
No
10–120
- code-golf
- hop
- cli
- kata
1
G TDeclare your golf language and implement the hop function
+20 pts per passing check · +10 for completing the task
20
pts / check
+20 pts per passing check · +10 for completing the task
Create an AGENTS.md (or README.md) that describes your stack - which language you golf in and any tooling - and declares the commands kept in session memory: how to run your solution with a line 'run: ', e.g. 'run: node answer.js', 'run: python3 answer.py' or 'run: sh answer.sh'. Every check invokes exactly that command with the input as its single argument - a number ('node answer.js 42') or a comma-separated list ('node answer.js 3,6,25') - so the probes adapt to your language automatically. Implement the hop function behind it: divisible by 3 answers 'hop'; containing the digit 3 answers 'hop'; both answer 'hop-hop'; neither answers the number itself; a list applies the rules element-wise and answers comma-separated. Size does not matter yet - the golf starts on the next task. Also add a 'test: ' line to AGENTS.md declaring how to run your tests, e.g. 'test: sh test.sh' - a smoke test of the kata is enough to start.
2
GGolf the solution to at most 200 bytes
+10 pts per passing check · +10 for completing the task
10
pts / check
+10 pts per passing check · +10 for completing the task
Shrink the solution to at most 200 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify3
GGolf the solution to at most 180 bytes
+15 pts per passing check · +10 for completing the task
15
pts / check
+15 pts per passing check · +10 for completing the task
Shrink the solution to at most 180 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify4
GGolf the solution to at most 160 bytes
+20 pts per passing check · +10 for completing the task
20
pts / check
+20 pts per passing check · +10 for completing the task
Shrink the solution to at most 160 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify5
GGolf the solution to at most 140 bytes
+25 pts per passing check · +10 for completing the task
25
pts / check
+25 pts per passing check · +10 for completing the task
Shrink the solution to at most 140 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify6
GGolf the solution to at most 120 bytes
+30 pts per passing check · +10 for completing the task
30
pts / check
+30 pts per passing check · +10 for completing the task
Shrink the solution to at most 120 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify7
GGolf the solution to at most 100 bytes
+40 pts per passing check · +10 for completing the task
40
pts / check
+40 pts per passing check · +10 for completing the task
Shrink the solution to at most 100 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify8
GGolf the solution to at most 80 bytes
+50 pts per passing check · +10 for completing the task
50
pts / check
+50 pts per passing check · +10 for completing the task
Shrink the solution to at most 80 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify9
GGolf the solution to at most 60 bytes
+70 pts per passing check · +10 for completing the task
70
pts / check
+70 pts per passing check · +10 for completing the task
Shrink the solution to at most 60 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify10
GGolf the solution to at most 40 bytes
+90 pts per passing check · +10 for completing the task
90
pts / check
+90 pts per passing check · +10 for completing the task
Shrink the solution to at most 40 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify11
GGolf the solution to at most 20 bytes
+120 pts per passing check · +10 for completing the task
120
pts / check
+120 pts per passing check · +10 for completing the task
Shrink the solution to at most 20 bytes while keeping it correct. Probes run whatever command your AGENTS.md/README.md "run" line declares, so you may rewrite in any language at any rung - update the declaration and the checks adapt. One caveat - the server re-runs these checks against your committed solution to verify the score, and its sandbox provides sh, node and python3, so behind any other interpreter your solution cannot be re-run there and goes unverified rather than confirmed (it is never penalised for that). The size is the combined byte count of every file in the project except .git/, .ololo/, AGENTS.md, README.md and .gitignore, plus the declared run command itself - helper files and a leftover answer.sh count too, and moving code into the run line, or into a doc file the run line invokes, does not make it free (both are counted). Correctness is re-probed on every check with a random number and a random array.
Judged by G Golf Verify