[Buổi 1][Nhập môn][RDD] Bài 23: Tính tổng 1.


LÀM BÀI

Points: 10
Time limit: 2.0s
Memory limit: 20M

Author:
Problem types
Allowed languages
C++

Tính tổng 1.

Bối cảnh

Bài toán được mô tả qua yêu cầu và dữ liệu dưới đây.

Yêu cầu

Sn = 1 + 2 + 3 + 4 + … + n.

Input

Số nguyên không âm n.(1 ≤ n ≤ 10^8).

Output

Kết quả của bài toán.

Ràng buộc

Đề gốc không nêu ràng buộc riêng.

Ví dụ 1

Input

7

Output

28

Thông tin học tập

  • Buổi: B01
  • Concepts: variables, data types, cin/cout, arithmetic expressions
  • Giới hạn kiến thức: B01-B01
  • Time limit: 2 seconds
  • Memory limit: 20 MB
  • Point: 10

Comments

There are no comments at the moment.

Zalo