Skip to content
Onsite

Even Sum Below N

EasyP3Coding

Return the sum of all even numbers from 1 to n inclusive.

Example 1

Input
n = 10
Output
30

Example 2

Input
n = 1
Output
0

Example 3

Input
n = 2
Output
2

Constraints

  • 1 <= n <= 10^6

Hints

Run checks the 3 visible tests, Submit all 8.