Sum
Time limit1sMemory limit128 MB
Given an integer n, compute and print the sum of all integers from 1 to n.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Given an integer , write a program that computes the sum of all integers from to .
Input
The first line contains an integer ().
Output
Print the sum of all integers from to .