TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Optimal denominations to split a dollar

3 pointsby zjonssonalmost 11 years ago

1 comment

daveloyallalmost 11 years ago
Recently, I learned (via HN) that prime numbers are the magical building blocks of numbers.<p>By using that fact (without understanding it), I was able to beat the author&#x27;s scores slightly by only including prime coins in the list of candidates.<p><a href="http://jsfiddle.net/JY648/" rel="nofollow">http:&#x2F;&#x2F;jsfiddle.net&#x2F;JY648&#x2F;</a><p>Oh, the author still wins on the 4- and 5-coin variations.<p>When I try to include more than X candidates, it crashes. Help?
评论 #8140263 未加载
评论 #8140389 未加载