Cánh diều - SUMN - Tổng N số đầu tiên

View as PDF



Authors:
Problem types
Points: 800 (p) Time limit: 1.0s Memory limit: 256M Input: stdin Output: stdout

Cho số nguyên \(N\). Tính và in ra tổng \(N\) số nguyên liên tiếp đầu tiên \(1+2+…+N\).

Input

  • Một số nguyên \(N \le 10^9\).

Output

  • Một số nguyên là kết quả.

Example

Test 1

Input
5
Output
15

Test 2

Input
3
Output
6

Comments (6)

Most recent
Loading comments...