Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (150 + 1)(150 / 2) = 11 325
- 150 / 3 = 50
- // 50 multiples of 3
- (50 + 1)(50 / 2) * 3 = 3 825
- 150 / 7 = 21,4285714286
- // 21 multiples of 7
- (21 + 1)(21 / 2) * 7 = 1 617
- 150 / 21 = 7,1428571429
- // 7 multiples of 21
- // (multiples of both 3 and 7)
- (7 + 1)(7 / 2) * 21 = 588
- 11325 - 3825 - 1617 + 588 = 6 471
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement