Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Enumerable.Range(0, Math.Floor(Math.Sqrt(num)) ).Aggregate(
- Enumerable.Range(2, num).ToList(),
- (result, index) => {
- result.RemoveAll(i => i > result[index] && i % result[index] == 0);
- return result;
- }
- );
Add Comment
Please, Sign In to add comment