Problem Solving - Update 22

Problem 3: 1-1000