```ts
/** The price of one unit, in whole pence. */
export function unitPrice(total: number, count: number): number {
  if (count === 0 || total < 0) {
    throw new Error("total and count must be non-negative");
  }
  return Math.floor(count * 100 / total);
}
```