Tính tổng S = 1 + 2 + 3 + … + ~n~

View as PDF

Submit solution

Points: 100.00
Time limit: 0.2s
Memory limit: 100M
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
C, C++, GAS64, Pascal, Perl, PHP, Python, Sed, TCL, Text

Tính ~S(n)~ = 1 + 2 + 3 + ... + ~n~. Với ~n~ cho trước.

  • Đầu vào là 1 số 𝑛
  • Đầu ra là kết quả 𝑆

Input

5

Output

15

Loading...