Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not very tedious. Instead of dividing the product by 2, you can just divide whichever of x or x+1 is even by 2 before multiplying.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: