This product was not featured by Product Hunt yet. It will not be visible on their landing page and won't be ranked (cannot win product of the day regardless of upvotes).
H9A counts how many times a digit (0–9) appears across any range of numbers. Unlike brute-force scripts, it uses a closed-form O(log n) algorithm, so a range from 1 to 1,000,000,000,000 returns instantly. It prints a colorized, step-by-step breakdown of each decimal place, supports machine-readable JSON, and can render terminal-style screenshots.
H9A started as the classic puzzle "How many 9s are in 1–100?" (the answer is 20, and 99 counts twice). I turned it into a proper little Python package: a `h9a` CLI plus an importable library returning a per-place breakdown.
Highlights:
- O(log n) closed-form counting — no range iteration, so huge ranges are instant
- Step-by-step explanation of every decimal place (ones, tens, hundreds, ...)
- `--json` output for scripting, `--no-color` for terminals without ANSI
- `--screenshot` renders the output to a PNG with Pillow
- 74 tests, ruff + mypy + pre-commit, CI docs and container publishing
Install: `pip install h9a`
Docs: https://rkriad585.github.io/h9a/
Source: https://github.com/rkriad585/h9a
No comment highlights available yet. Please check back later!
About H9A on Product Hunt
“Count any digit in any range — instantly.”
H9A was submitted on Product Hunt and earned 2 upvotes and 1 comments, placing #134 on the daily leaderboard. H9A counts how many times a digit (0–9) appears across any range of numbers. Unlike brute-force scripts, it uses a closed-form O(log n) algorithm, so a range from 1 to 1,000,000,000,000 returns instantly. It prints a colorized, step-by-step breakdown of each decimal place, supports machine-readable JSON, and can render terminal-style screenshots.
H9A was featured in Open Source (68.7k followers), Developer Tools (517.6k followers) and GitHub (41.4k followers) on Product Hunt. Together, these topics include over 121.3k products, making this a competitive space to launch in.
Who hunted H9A?
H9A was hunted by RK Riad Khan. A “hunter” on Product Hunt is the community member who submits a product to the platform — uploading the images, the link, and tagging the makers behind it. Hunters typically write the first comment explaining why a product is worth attention, and their followers are notified the moment they post. Around 79% of featured launches on Product Hunt are self-hunted by their makers, but a well-known hunter still acts as a signal of quality to the rest of the community. See the full all-time top hunters leaderboard to discover who is shaping the Product Hunt ecosystem.
Want to see how H9A stacked up against nearby launches in real time? Check out the live launch dashboard for upvote speed charts, proximity comparisons, and more analytics.