Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
periram
on Dec 8, 2022
|
parent
|
context
|
favorite
| on:
Finding divisors of a number with Python (2019)
Also (n+1)^ = n^2 + 2n +1 i.e. you can have the previous square and just add 2n+1 to it to get the next square (which is 3 additions in total). square += i + i + 1 if square < n; break
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: