Comment

Comment by nh23423fefe

why would you check excess numbers instead of just checking n^2 < end

for (int i=0; i<sqrt(n); i++) == for (int i=0; i*i < n; i++)

^2 is monotonic

parent nh23423fefe 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton