Compute the value of 1-2+3-4+...+2019-2020+2021
1 - 2 + 3 - 4 + ... + 2019 - 2020 + 2021 = 1007.
Compute the value of1−2+3−4+⋯+2019−2020+2021.
s=1−2+3−4+⋯+2019−2020+2021s=2021−2020+2019−⋯−4+3−2+12s=2022−2022+2022−2022+⋯+2022−2022+20222s=0+0+⋯+0+20222s=2022s=1011
1−2+3−4+⋯+2019−2020+2021=1011
heureka posted a great solution, so I will post a different one.
1−2+3−4+⋯+2019−2020+2021=(1−2)+(3−4)+⋯+(2019−2020)+2021=(−1)+(−1)+⋯+(−1)⏟1010 times+2021=−1010+2021=1011