Tính tổng chữ số


Submit solution

Points: 50
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

Nhập vào số nguyên dương n. Em hãy tính tổng các chữ số từ 1 đến số n.

Đầu vào:

  • Nhập vào 1 số duy nhất n (0<n103)

Kết quả:

  • Một số nguyên dương là kết quả của bài toán

Ví dụ:

Đầu vào

Copy
12

Đầu ra

Copy
51

Comments

There are no comments at the moment.