**Hadi & Math**↵
↵
What is the Sum of the numbers from 1 ... n↵
↵
<spoiler summary="hint">↵
excepted_sum = n*(n+1)/2↵
</spoiler>↵
↵
Knowing the actual sum and the excepted sum, how to find the missing sum?↵
↵
<spoiler summary="solution">↵
answer = n*(n+1)/2 — sum(Array)↵
</spoiler>↵
↵
↵
<spoiler summary="tip">↵
For c++ users use long long, and for java users use long to avoid overflow↵
</spoiler>↵
↵
**Michael And The Easy A**↵
↵
<spoiler summary="hint 1">↵
What is the maximum sum we can obtain if we have even number of negative integers?↵
</spoiler>↵
↵
<spoiler summary="hint 2">↵
What about odd number of negative integers?↵
</spoiler>↵
↵
<spoiler summary="hint 3">↵
What is the maximum number of negative integers we may have in an optimal sequence ?↵
</spoiler>↵
↵
↵
What is the Sum of the numbers from 1 ... n↵
↵
<spoiler summary="hint">↵
excepted_sum = n*(n+1)/2↵
</spoiler>↵
↵
Knowing the actual sum and the excepted sum, how to find the missing sum?↵
↵
<spoiler summary="solution">↵
answer = n*(n+1)/2 — sum(Array)↵
</spoiler>↵
↵
↵
<spoiler summary="tip">↵
For c++ users use long long, and for java users use long to avoid overflow↵
</spoiler>↵
↵
**Michael And The Easy A**↵
↵
<spoiler summary="hint 1">↵
What is the maximum sum we can obtain if we have even number of negative integers?↵
</spoiler>↵
↵
<spoiler summary="hint 2">↵
What about odd number of negative integers?↵
</spoiler>↵
↵
<spoiler summary="hint 3">↵
What is the maximum number of negative integers we may have in an optimal sequence
</spoiler>↵
↵