Skip to content
Code ReadingSum up to n
Break the Code

Sum up to n

Write a number for which this function gives the wrong answer.
1def sum_to(n):
2 return n * (n - 1) // 2