AAERANK/ Prompt Golf · Hole 1split_bill
Par600
Strokes0
Tokens0
Sign in

The brief

you can't edit the code — only instruct the AI
split_bill(total_cents, people)
  • Returns people whole-cent amounts that sum to exactly total_cents.
  • The amounts differ by at most 1.
  • When it doesn't divide evenly, the people listed last pay the extra cent(s).
split_bill(100, 3) [33, 33, 34]
current code — written by the AI
function split_bill(total_cents, people) {
  // Split a bill evenly. Everyone pays a whole number of cents.
  const share = Math.floor(total_cents / people);
  return Array(people).fill(share);
}
6 hidden cases · 1 shown

Drive the AI

it does exactly what you say
Drive me to fix split_bill so it passes the hidden tests. I do exactly what you tell me — nothing more — so be precise. Every message costs tokens; fewest tokens wins. Par is 600. Hit “Run tests” whenever you want to check.
token spend vs par0 / 600