Brain Test Level 338
Brain Test Level 338 Solution
The question asks you to calculate the sum of all integers from 1 to 100 (1 + 2 + 3 + ... + 100).
This is a classic arithmetic series problem. You can solve it quickly using Gauss's method (pairing the numbers).
Pair the first and last numbers: 1 + 100 = 101. The second and second-to-last: 2 + 99 = 101. There are 50 such pairs (100 / 2).
Multiply the sum of one pair by the number of pairs: 101 * 50 = 5050.
The answer is 5050.
DIFFICULTY
Medium
PRO TIP
Try pairing the first number with the last number. (1+100, 2+99, etc.)